/* Base Styles */
:root {
  --primary: #38618c;
  --primary-dark: #2a4a6d; /* Darker version for hover effects */
  --secondary: #a3a8ac;
  --dark: #222;
  --footer-color: #1e3a54; /* Darker version of the primary color */
  --light: #f8f8f8;
  --white: #fff;
  --error: #e74c3c;
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: "Work Sans", sans-serif;
  line-height: 1.6;
  color: var(--dark);
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  line-height: 1.3;
  text-transform: uppercase;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  position: relative;
}

.section-title:after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 4px;
  background-color: var(--primary);
}

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

.text-center:after {
  left: 50%;
  transform: translateX(-50%);
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  background-color: var(--primary);
  color: var(--white);
  border: none; /* Removed border */
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

/* Update the primary button hover effect */
.btn:hover {
  background-color: var(--primary-dark); /* Use darker color on hover */
  color: var(--white); /* Keep text white */
}

/* Remove active/clicked effect */
.btn:active {
  transform: none; /* Already removed */
  /* No additional effects on click */
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-outline:hover {
  background-color: transparent;
  color: var(--primary-dark); /* Darker text on hover */
  border-color: var(--primary-dark); /* Darker border on hover */
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

/* Logo styles */
.logo {
  display: flex;
  align-items: center;
}

.logo-image {
  height: 40px;
  width: auto;
}

.footer-logo-image {
  height: 50px;
  filter: brightness(0) invert(1);
}

/* Add this to your existing CSS file */

.logo-link {
  display: inline-block;
  cursor: pointer;
}

.logo-link:focus {
  outline: none;
}

/* Navigation and Language Switcher */
.nav-list {
  display: flex;
  list-style: none;
  align-items: center; /* Ensure vertical alignment */
  height: 100%;
}

.nav-link {
  padding: 0.5rem 1rem;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  position: relative;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-link:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition);
  transform: translateX(-50%);
}

.nav-link:hover:after {
  width: 70%;
}

.nav-divider {
  width: 1px;
  height: 20px;
  background-color: rgba(0, 0, 0, 0.2);
  margin: 0 10px;
}

.lang-item {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.lang-icon {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  color: var(--dark);
  cursor: pointer;
  padding: 0.5rem 1rem;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  height: 100%;
  transition: var(--transition);
}

.lang-icon:hover {
  color: var(--primary);
}

.lang-icon svg {
  width: 16px; /* Reduced from 18px to 16px */
  height: 16px; /* Reduced from 18px to 16px */
  margin-right: 8px; /* Increased from 5px to 8px for more spacing */
}

.current-lang {
  font-size: 0.9rem;
}

.menu-toggle {
  display: none;
  cursor: pointer;
}

.hamburger {
  width: 30px;
  height: 20px;
  position: relative;
}

.hamburger span {
  display: block;
  position: absolute;
  height: 3px;
  width: 100%;
  background: var(--primary);
  border-radius: 3px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: var(--transition);
}

.hamburger span:nth-child(1) {
  top: 0px;
}

.hamburger span:nth-child(2) {
  top: 8px;
}

.hamburger span:nth-child(3) {
  top: 16px;
}

/* Hero Section */
.hero {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  overflow: hidden;
}

/* Add this new rule for the English title spacing */
.hero-title .first-part {
  margin-right: 1.5rem; /* Add extra space between the words */
}

/* Add this new rule for mobile hero title */
.mobile-break {
  display: none;
}

@media (max-width: 768px) {
  .hero-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .hero-title .first-part,
  .hero-title .second-part {
    display: block;
  }

  /* Only add the hyphen for German version */
  .hero-title.german .first-part::after {
    content: "-";
  }

  /* No hyphen for English version */
  .hero-title.english .first-part::after {
    content: "";
  }
}

.video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.video-container video {
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

/* Mobile adjustments for hero section */
@media (max-width: 768px) {
  .hero {
    height: 100vh; /* Ensure full height */
  }

  .video-container video {
    object-fit: cover; /* Ensure video covers the container */
  }
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 0 20px;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  font-weight: 300;
  letter-spacing: 3px;
}

/* Hero animations */
.hero-title,
.hero-subtitle {
  transition: opacity 1.5s cubic-bezier(0.19, 1, 0.22, 1), transform 1.5s cubic-bezier(0.19, 1, 0.22, 1);
  will-change: opacity, transform;
}

.hero-title {
  animation-delay: 0.5s;
}

.hero-subtitle {
  animation-delay: 1.2s;
}

/* Add this after the hero section styles */

/* Accessibility - Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .video-container video {
    display: none;
  }

  .hero .video-container {
    background: url("assets/images/parallax/giesserei.jpeg") center / cover no-repeat;
  }

  /* Keep the overlay visible for text contrast */
  .hero .overlay {
    background-color: rgba(0, 0, 0, 0.6);
  }

  /* Disable parallax effects for reduced motion */
  .parallax {
    background-attachment: scroll !important;
    transition: none !important;
  }

  /* Disable animations for reduced motion */
  .animate-on-scroll,
  .scroll-animate {
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  /* Disable marquee animation */
  .marquee-content {
    animation: none !important;
    transform: none !important;
  }
}

/* Partners Section */
.partners {
  padding: 30px 0;
  background-color: var(--light);
  overflow: hidden;
}

.marquee {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.marquee-content {
  display: inline-block;
  animation: marquee 30s linear infinite;
}

/* Make marquee faster on mobile */
@media (max-width: 768px) {
  .marquee-content {
    animation: marquee 20s linear infinite; /* Changed from 30s to 20s for faster scrolling */
  }
}

.partner-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 35px; /* Increased from 25px to 35px for more spacing */
  height: 60px;
  vertical-align: middle;
}

.partner-logo img {
  max-height: 20px; /* Reduced from 22px to 20px */
  width: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: var(--transition);
}

.partner-logo img[alt="Siemens"],
.partner-logo img[alt="Airbus"] {
  max-height: 16px; /* Reduced from 18px to 16px */
}

.partner-logo img[alt="Porsche"] {
  max-height: 14px; /* Reduced even more for Porsche */
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* About Section */
.about {
  padding: 100px 0;
}

.about-content {
  display: flex;
  align-items: center;
  gap: 50px;
}

.about-text {
  flex: 1;
}

.about-text p {
  margin-bottom: 1.5rem;
}

.about-image {
  flex: 1;
  overflow: hidden;
}

.about-image img {
  width: 100%;
  transition: transform 0.5s ease;
}

.about-image:hover img {
  transform: scale(1.05);
}

/* Parallax Sections - Completely revised */
.parallax {
  height: 450px;
  position: relative;
  overflow: hidden;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center 50%; /* Default position */
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  z-index: 1;
  /* Remove fixed attachment - we'll handle parallax with JS */
  background-attachment: scroll;
}

.parallax::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.parallax-inner {
  position: relative;
  z-index: 2; /* Above the overlay */
  text-align: center;
  width: 100%;
  height: 100%;
}

.parallax-1 {
  background-image: url("assets/images/parallax/giesserei.png");
}

.parallax-2 {
  background-image: url("assets/images/parallax/millingdrill2.png");
}

/* Mobile adjustments for parallax sections */
@media (max-width: 768px) {
  .parallax {
    height: 300px;
  }
}

@media (max-width: 576px) {
  .parallax {
    height: 250px; /* Even smaller height on very small screens */
  }
}

/* Accessibility - Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .parallax {
    background-attachment: scroll !important;
    transition: none !important;
    /* Ensure background is visible and centered */
    background-position: center center !important;
  }
}

/* Products Section */
.products {
  padding: 120px 0; /* Increased padding */
  overflow: hidden; /* Added to contain the off-screen animations */
}

.products .section-title {
  margin-bottom: 4rem; /* Increased space between heading and first product */
}

.product-item {
  display: flex;
  align-items: center;
  margin-bottom: 150px; /* Increased space between products */
  gap: 50px;
  position: relative; /* Added for positioning context */
}

.product-item:last-child {
  margin-bottom: 50px; /* Less margin for the last item */
}

.product-item.reverse {
  flex-direction: row-reverse;
}

.product-image {
  flex: 1;
  overflow: hidden;
  position: relative; /* Added for positioning context */
}

.product-image img {
  width: 100%;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-image:hover img {
  transform: scale(1.03);
}

.product-content {
  flex: 1;
  position: relative; /* Added for positioning context */
}

.product-content h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.product-content p {
  margin-bottom: 1.5rem;
}

.product-content .btn-outline {
  background-color: transparent;
  color: var(--primary);
  border: none;
  padding: 12px 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.product-content .btn-outline:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition);
}

/* Update product button hover effect */
.product-content .btn-outline:hover {
  color: var(--primary-dark); /* Darker color on hover */
  opacity: 1; /* Remove opacity change */
}

.product-content .btn-outline:hover:after {
  background-color: var(--primary-dark); /* Darker underline on hover */
}

.product-content .btn-outline svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.product-content .btn-outline:hover svg {
  transform: translateX(5px);
}

/* Enhanced scroll animations for products */
.scroll-animate[data-animation="slide-right"] {
  transform: translateX(-100%); /* Start completely off-screen */
  opacity: 0;
}

.scroll-animate[data-animation="slide-left"] {
  transform: translateX(100%); /* Start completely off-screen */
  opacity: 0;
}

.scroll-animate {
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.scroll-animate.active {
  opacity: 1;
  transform: translateX(0);
}

/* Contact Section */
.contact {
  padding: 100px 0;
  background-color: var(--light);
  color: var(--dark);
}

.contact .section-title:after {
  background-color: var(--primary);
}

.contact-container {
  display: flex;
  gap: 50px;
}

.contact-form {
  flex: 1.5;
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 1.5rem;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
}

.required {
  color: var(--error);
  margin-left: 3px;
}

.form-input {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px; /* Added border radius */
  background-color: var(--white);
  color: var(--dark);
  font-family: "Work Sans", sans-serif;
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  background-color: var(--white);
}

.form-input.error {
  border-color: var(--error);
}

.error-message {
  display: none;
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 5px;
  position: absolute;
  left: 0;
}

.form-group.has-error .error-message {
  display: block;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  padding-bottom: 20px;
}

.checkbox input {
  width: auto;
}

.checkbox label {
  margin-bottom: 0;
  font-weight: 400;
}

.checkbox .error-message {
  bottom: 0;
  top: auto;
}

.contact .btn {
  background-color: var(--primary);
  color: var(--white);
  border-radius: 4px;
}

.contact .btn:hover {
  background-color: var(--primary-dark); /* Darker on hover */
  color: var(--white);
}

.contact-info {
  flex: 1;
}

.info-item {
  margin-bottom: 2rem;
}

.info-item h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-item h3 svg {
  width: 20px;
  height: 20px;
  stroke: var(--primary);
}

/* Footer */
.footer {
  background-color: var(--footer-color);
  color: var(--white);
  padding: 50px 0 20px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.footer-logo {
  display: flex;
  align-items: center;
}

.footer-links ul {
  display: flex;
  list-style: none;
  gap: 20px;
}

.footer-links a:hover {
  color: var(--light);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-copyright {
  text-align: left;
}

.footer-legal-links {
  text-align: right;
}

.footer-legal-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}

.footer-legal-links a:hover {
  color: var(--white);
}

.footer-divider {
  margin: 0 10px;
  color: rgba(255, 255, 255, 0.4);
}

/* Animation Classes */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.animate-on-scroll.active {
  opacity: 1;
  transform: translateY(0);
}

/* Optimize animations with will-change for better performance */
.animate-on-scroll,
.scroll-animate {
  will-change: opacity, transform;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .about-content,
  .product-item,
  .contact-container {
    flex-direction: column;
  }

  .product-item.reverse {
    flex-direction: column;
  }

  .section-title {
    font-size: 2rem;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .parallax h2 {
    font-size: 2.2rem;
  }

  .logo-image {
    height: 30px;
  }

  .footer-logo-image {
    height: 40px;
  }

  .form-row {
    flex-direction: column;
    gap: 1.5rem;
  }

  /* Adjust partner logos for medium screens */
  .partner-logo {
    margin: 0 25px;
  }

  .partner-logo img {
    max-height: 18px;
  }

  .partner-logo img[alt="Siemens"],
  .partner-logo img[alt="Airbus"] {
    max-height: 14px;
  }

  .partner-logo img[alt="Porsche"] {
    max-height: 12px;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: 0;
    background-color: var(--white);
    overflow: hidden;
    transition: height 0.3s ease;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  }

  .nav.active {
    height: auto;
  }

  .nav-list {
    flex-direction: column;
    padding: 20px 0;
  }

  .nav-link {
    display: block;
    padding: 15px 20px;
  }

  .nav-divider {
    display: none;
  }

  .lang-item {
    margin: 10px 20px;
  }

  .lang-icon {
    justify-content: flex-start;
    padding: 10px 0;
  }

  .footer-content {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .footer-links ul {
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 15px;
  }

  .footer-copyright,
  .footer-legal-links {
    text-align: center;
  }

  /* Adjust partner logos for mobile */
  .partners {
    padding: 20px 0;
  }

  .partner-logo {
    margin: 0 20px;
    height: 50px;
  }

  .partner-logo img {
    max-height: 24px; /* Increased from 16px to 24px */
  }

  .partner-logo img[alt="Siemens"],
  .partner-logo img[alt="Airbus"] {
    max-height: 20px; /* Increased from 12px to 20px */
  }

  .partner-logo img[alt="Porsche"] {
    max-height: 18px; /* Increased from 10px to 18px */
  }

  /* Improve parallax sections on mobile */
  .parallax {
    height: 300px;
    background-attachment: fixed; /* Disable fixed background on mobile */
    background-size: cover !important; /* Force cover size */
    background-position: center center !important; /* Force center position */
  }

  .parallax-1,
  .parallax-2 {
    background-size: cover !important;
    background-position: center center !important;
  }

  /* Ensure no white gap at bottom */
  body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  .footer {
    margin-top: auto;
  }
}

@media (max-width: 576px) {
  .hero-content h1 {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .parallax {
    height: 250px; /* Even smaller height on very small screens */
  }

  .parallax h2 {
    font-size: 1.8rem;
  }

  /* Further adjust partner logos on very small screens */
  .partner-logo {
    margin: 0 15px;
    height: 45px;
  }

  .partner-logo img {
    max-height: 22px; /* Increased from 14px to 22px */
  }

  .partner-logo img[alt="Siemens"],
  .partner-logo img[alt="Airbus"] {
    max-height: 18px; /* Increased from 11px to 18px */
  }

  .partner-logo img[alt="Porsche"] {
    max-height: 16px; /* Increased from 9px to 16px */
  }
}

/* Accessibility Enhancements */
:focus {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.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;
}

/* Skip to main content link for keyboard users */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: 8px;
  z-index: 100;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

.btn-rounded {
  border-radius: 4px;
}

/* Add a class for iOS-specific styles */
.ios .parallax {
  background-attachment: scroll !important; /* Fallback for iOS */
}
