/*
 * TD‑Production — Modern One‑Page Website Stylesheet
 *
 * This stylesheet defines the layout, typography and animations for
 * the TD‑Production landing page. A muted newspaper‑style headline
 * font is paired with a clean sans‑serif for body text. Colour
 * variables allow easy theme adjustment. Responsive breakpoints
 * ensure that content remains legible on tablets and phones, while
 * subtle animations bring the page to life as the user scrolls.
 */

/* Root colour palette and fonts */
:root {
  --primary-color: #0a1e40; /* deep navy used for headers and hero */
  --primary-light: #122f68; /* slightly lighter shade for overlays */
  --secondary-color: #f5f5f5; /* off‑white background for sections */
  --accent-color: #007acc; /* bright blue accent for links and buttons */
  --text-color: #333333; /* standard text colour */
  --white: #ffffff;
  --heading-font: 'Merriweather', serif;
  --body-font: 'Open Sans', sans‑serif;

  /* Design Tokens für animierte Buttons */
  --btn-scale: 1.05;
  --btn-transition: 0.25s ease;
  --btn-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

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

html {
  scroll-behavior: smooth;
}

/* Prevent horizontal scrollbars due to slider overflow */
html,
body {
  overflow-x: hidden;
}

body {
  font-family: var(--body-font);
  color: var(--text-color);
  background-color: var(--secondary-color);
  line-height: 1.6;
}

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

/* Utility container to constrain content width */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Header */
header.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(10, 30, 64, 0.9);
  backdrop-filter: saturate(180%) blur(8px);
  transition: background 0.3s ease;
}

header.header.scrolled {
  background: rgba(10, 30, 64, 1);
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
}

header .logo img {
  /* Increased size so das Logo gut lesbar ist */
  height: 80px;
  width: auto;
}

/* Navigation */
.nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav a {
  font-family: var(--heading-font);
  font-weight: 600;
  font-size: 1rem;
  color: var(--white);
  text-decoration: none;
  position: relative;
  padding: 5px 0;
  transition: color 0.3s ease;
}

/* TeamViewer CTA button in navigation */
/* Spezieller Stil für den TeamViewer‑Button mit sanften Animationen */
.nav a.teamviewer {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent-color);
  color: var(--white);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  overflow: hidden;
  /* Ausgangszustand ohne Schatten */
  box-shadow: 0 0 0 2px transparent;
  transition: transform var(--btn-transition), box-shadow var(--btn-transition), background-color 0.2s ease;
}
/* Glanz-/Schimmer‑Effekt: Pseudo‑Element, das bei Hover/Fokus über den Button zieht */
.nav a.teamviewer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 150%;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0) 100%);
  opacity: 0;
}
/* Schimmer‑Animation nur wenn keine reduzierte Bewegung gewünscht wird */
@media (prefers-reduced-motion: no-preference) {
  .nav a.teamviewer:hover::before,
  .nav a.teamviewer:focus-visible::before {
    animation: shimmer 1.2s forwards;
    opacity: 1;
  }
}
@keyframes shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}
/* Hover- und Fokus‑Stil für den TeamViewer‑Button */
.nav a.teamviewer:hover,
.nav a.teamviewer:focus-visible {
  transform: scale(var(--btn-scale));
  box-shadow: var(--btn-shadow);
  background-color: var(--accent-color);
  color: var(--white);
}
/* Aktiver Zustand: Button leicht gedrückt */
.nav a.teamviewer:active {
  transform: scale(0.97);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
/* Klare Focus‑Outline mit hohem Kontrast */
.nav a.teamviewer:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 2px;
}
/* Unterstreichungsindikator für den TeamViewer‑Button entfernen */
.nav a.teamviewer::after {
  display: none;
}


.nav a:hover {
  color: var(--accent-color);
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

/* Burger menu for small screens */
.burger {
  display: none;
  font-size: 1.5rem;
  color: var(--white);
  cursor: pointer;
}

/* Mobile navigation */
@media (max-width: 768px) {
  .nav ul {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 240px;
    height: calc(100% - 70px);
    background-color: var(--primary-light);
    flex-direction: column;
    gap: 20px;
    padding: 30px 20px;
    transition: right 0.3s ease;
  }
  .nav.nav-open ul {
    right: 0;
  }
  .burger {
    display: block;
  }
}

/* Sections */
.section {
  /* Add vertical padding for breathing space */
  padding: 100px 0;
  /* Ensure each section fills at least the viewport height so nächstes Segment nicht hineinragt */
  min-height: 100vh;
}

/* Home / Hero */
.home-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, #042a65 100%);
  color: var(--white);
  position: relative; /* enable absolute positioning for particles */
}

.home-section .hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
  position: relative;
  z-index: 1; /* ensure content is above particle layer */
}

.hero-text {
  flex: 1 1 500px;
}

.hero-text h1 {
  font-family: var(--heading-font);
  font-size: 3rem;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--white);
}

.hero-text p {
  font-size: 1.1rem;
  max-width: 600px;
  margin-bottom: 30px;
  color: var(--white);
}

.btn {
  display: inline-block;
  background-color: var(--accent-color);
  color: var(--white);
  padding: 12px 28px;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s ease;
}

.btn:hover {
  background-color: #005f99;
}

.hero-image {
  flex: 1 1 400px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Slide‑in Animation for the hero laptop */
@keyframes slideIn {
  0% {
    opacity: 0;
    transform: translateX(60px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* When the hero image container has the class 'animate-in', animate the child image */
.hero-image.animate-in img {
  animation: slideIn 0.8s ease-out forwards;
}

.hero-image img {
  width: 100%;
  max-width: 500px;
}

/* Company section */
.company-section {
  background-color: var(--secondary-color);
  color: var(--text-color);
}

.company {
  display: flex;
  align-items: center;
  gap: 50px;
  flex-wrap: wrap;
}

.company-text {
  flex: 1 1 400px;
}

.company-text h2 {
  font-family: var(--heading-font);
  font-size: 2rem;
  margin-bottom: 20px;
}

.company-text ul {
  list-style: none;
  line-height: 1.6;
}

.company-text ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
}

.company-text ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-size: 1.2rem;
  line-height: 1;
}

.company-image {
  flex: 1 1 400px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.company-image img {
  max-width: 400px;
  border-radius: 8px;
}

/* Company overview paragraphs styling */
.company-paragraph {
  margin-top: 15px;
}

/* Services section */
.services-section {
  background-color: var(--white);
  color: var(--text-color);
}

.services-section h2 {
  font-family: var(--heading-font);
  font-size: 2.2rem;
  margin-bottom: 40px;
  text-align: center;
}

.service-group {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 60px;
}


/* Reverse the layout for the Administration group to alternate the flow */
.service-group.admin {
  flex-direction: row-reverse;
}

.service-text {
  flex: 1 1 400px;
}

.service-text h3 {
  font-family: var(--heading-font);
  font-size: 1.6rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.service-text p {
  margin-bottom: 15px;
}

.service-text ul {
  list-style: none;
}

.service-text ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
}

.service-text ul li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--accent-color);
}

.service-image,
.service-extra {
  flex: 1 1 400px;
  display: flex;
  justify-content: center;
  align-items: center;
  /* ensure extra content like partner strip is vertically centered */
}

/* New banner for Administration section: wide horizontal image */
.service-banner {
  flex: 1 1 400px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.service-banner img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.service-image img {
  max-width: 400px;
  border-radius: 8px;
}

/* Partner icons scrolling strip */
.partner-strip {
  overflow: hidden;
  width: 100%;
  border-radius: 8px;
  position: relative;
  height: 80px;
  margin-top: 20px;
}

.partner-strip .strip {
  display: flex;
  align-items: center;
  height: 100%;
  width: 300%;
  /* The total width of three images ensures a seamless loop */
  animation: scroll-strip 20s linear infinite;
}

.partner-strip .strip img {
  height: 100%;
  width: auto;
}

@keyframes scroll-strip {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-33.33%); }
}

/* About section */
.about-section {
  background-color: var(--secondary-color);
  color: var(--text-color);
  /* kürzere Länge: überschreibe min-height und reduziere Padding */
  min-height: auto;
  padding: 80px 0;
}

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

.about-text {
  flex: 1 1 500px;
}

.about-text h2 {
  font-family: var(--heading-font);
  font-size: 2rem;
  margin-bottom: 20px;
}

.about-text p {
  margin-bottom: 15px;
}

.about-image {
  flex: 1 1 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-image img {
  /* Bild füllt den verfügbaren Raum und blendet zu den Rändern weich aus */
  max-width: 100%;
  height: auto;
  mask-image: radial-gradient(circle at center, black 70%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle at center, black 70%, transparent 100%);
}

/* Contact section */
.contact-section {
  background-color: var(--white);
  color: var(--text-color);
}

.contact-section h2 {
  text-align: center;
  font-family: var(--heading-font);
  font-size: 2.2rem;
  margin-bottom: 40px;
}

.contact-details {
  display: flex;
  gap: 50px;
  flex-wrap: wrap;
  justify-content: space-between;
}


.contact-form {
  flex: 1 1 400px;
  background-color: var(--secondary-color);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Heading inside contact info */
.contact-info h3 {
  font-family: var(--heading-font);
  /* nutze eine Größe, die etwas kleiner als die Hauptüberschrift ist */
  font-size: 1.6rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  font-family: var(--body-font);
}

.form-group textarea {
  resize: vertical;
}

.contact-form .btn {
  margin-top: 10px;
}

/* Footer */
.footer {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 30px 0;
  text-align: center;
  font-size: 0.9rem;
}

.footer-content p {
  margin-bottom: 5px;
}

/* Footer navigation list */
.footer-nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 10px;
  padding-left: 0;
}

.footer-nav a {
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--accent-color);
}


/* Animations triggered on scroll */
[data-animate] {
  opacity: 0;
  transition: all 0.8s ease-out;
}

[data-animate="slide-left"] {
  transform: translateX(80px);
}

[data-animate="slide-right"] {
  transform: translateX(-80px);
}

[data-animate="slide-up"] {
  transform: translateY(60px);
}

[data-animate="fade-in"] {
  transform: scale(0.95);
}

[data-animate].show {
  opacity: 1;
  transform: none;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .hero-text h1 {
    font-size: 2.5rem;
  }
  .hero-image {
    flex: 1 1 300px;
  }
  .service-group {
    gap: 30px;
  }
}

@media (max-width: 768px) {
  header .container {
    padding: 10px 0;
  }
  .hero-text {
    flex: 1 1 100%;
    text-align: center;
  }
  .hero-image {
    flex: 1 1 100%;
  }
  .company,
  .about {
    gap: 30px;
  }
  .service-group {
    margin-bottom: 40px;
  }
  .contact-details {
    gap: 30px;
  }
}

@media (max-width: 576px) {
  .hero-text h1 {
    font-size: 2rem;
  }
  .nav a {
    font-size: 0.9rem;
  }
  .contact-section h2,
  .services-section h2 {
    font-size: 1.8rem;
  }
  .partner-strip {
    height: 80px;
  }
}

/* Partners Section */
.partners-section {
  background-color: var(--white);
  color: var(--text-color);
  /* Überschreibe die generelle min-height für diesen Abschnitt, damit der Streifen nicht den ganzen Bildschirm ausfüllt */
  min-height: auto;
  padding: 40px 0;
}

.partners-section h2 {
  font-family: var(--heading-font);
  font-size: 2rem;
  text-align: center;
  margin-bottom: 30px;
}

/* Partner carousel styles: create an endless marquee by duplicating the logo group */
.partners-carousel {
  overflow: hidden;
  width: 100%;
  height: 120px;
  position: relative;
}

/* The track that slides horizontally; contains two identical groups for seamless looping */
.logo-track {
  display: flex;
  align-items: center;
  height: 100%;
  flex-wrap: nowrap;
  /* Die eigentliche Bewegung wird via JavaScript gesteuert; daher keine CSS‑Animation */
  animation: none;
}

/* Each group holds one set of partner logos */
.logo-group {
  display: flex;
  align-items: center;
}

.logo-track img {
  /* Einheitliche Breite für alle Logos, damit die beiden Gruppen deckungsgleich sind */
  height: 80px;
  /* Natürliche Breite beibehalten, damit Logos nicht abgeschnitten werden */
  width: auto;
  margin: 0 40px;
  object-fit: contain;
  flex: 0 0 auto;
}

@keyframes scroll-partners {
  0% {
    transform: translateX(0);
  }
  100% {
    /* Shift by half of the track width (two identical logo groups) */
    transform: translateX(-50%);
  }
}

/* Service slider controls and wrapper */
.service-slider {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  margin-top: 30px;
}

/* Wrapper to mask overflow of sliding cards */
.service-boxes-wrapper {
  overflow: hidden;
  width: 100%;
}

/* Grid layout for Managed Services when not using a horizontal slider */
.service-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 30px;
  justify-content: center;
}

/* Buttons used to navigate the managed service slider */
.slider-btn {
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s ease;
  flex-shrink: 0;
  margin: 0 10px;
}

/* Position the navigation buttons on top of the slider content */
.service-slider .prev-btn {
  position: absolute;
  /* Place the arrow slightly outside the slider so it doesn’t cover content */
  /* Position arrow within the left padding */
  /* Position arrow outside of the slider so it doesn’t cover text */
  /* Position the arrow sufficiently outside so it doesn’t overlap the card text */
  /* Position arrows slightly outside the card area */
  left: -50px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

.service-slider .next-btn {
  position: absolute;
  /* Place the arrow slightly outside the slider so it doesn’t cover content */
  /* Position arrow within the right padding */
  /* Position arrow outside of the slider so it doesn’t cover text */
  /* Position the arrow sufficiently outside so it doesn’t overlap the card text */
  /* Position arrows slightly outside the card area */
  right: -50px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

/* On smaller screens, bring arrows inside so they remain visible */
@media (max-width: 768px) {
  .service-slider .prev-btn {
    left: 10px;
  }
  .service-slider .next-btn {
    right: 10px;
  }
}

.slider-btn:hover {
  background-color: var(--accent-color);
}

/* Ensure the left and right arrow icons scale down inside the round buttons */
.slider-btn i {
  pointer-events: none;
  /* Keep default sizing for legacy FA icons (not used currently) */
  font-size: 1rem;
  color: var(--white);
}

/* Character arrows inside slider buttons */
.slider-btn .slider-arrow {
  pointer-events: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--white);
}

/* Managed Services boxes */
.service-boxes {
  display: flex;
  /* disable wrapping so cards form a single horizontal row for the slider */
  flex-wrap: nowrap;
  gap: 20px;
  margin-top: 20px;
  transition: transform 0.5s ease;
}

.managed-card {
  /* Fixed Basis: drei Karten pro Zeile auf großen Bildschirmen */
  flex: 0 0 calc(33.333% - 20px);
  background-color: var(--secondary-color);
  border-radius: 8px;
  padding: 32px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.managed-card h4 {
  font-family: var(--heading-font);
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

/* Icons inline with headings in managed cards */
.managed-card h4 i {
  margin-right: 8px;
  font-size: 1.4rem;
  color: var(--accent-color);
  vertical-align: middle;
}

.managed-card ul {
  list-style: none;
}

.managed-card ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
}

.managed-card ul li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--accent-color);
}

/* Icon styling for each Managed Service card */
.managed-card .service-icon {
  /* Größeres Icon und zentriert im Kartenkopf */
  font-size: 2.4rem;
  color: var(--accent-color);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
/* Optional overlay for combined icons (e.g. cloud + sync) */
.managed-card .overlay-icon {
  font-size: 1rem;
  position: absolute;
  /* Positioniere das Overlay oben rechts in der Icon‑Box */
  top: 0;
  right: 0;
  color: var(--accent-color);
}

/* Image icons for managed services */
.service-icon-img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto 12px;
}

/* Hover effect for Managed Services cards */
.managed-card:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Selected Managed Service card: größerer Fokus und Schatten */
.managed-card.selected {
  transform: translateY(-8px) scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  z-index: 2;
}

@media (max-width: 992px) {
  .managed-card {
    flex: 0 0 calc(50% - 20px);
  }
}

@media (max-width: 576px) {
  .managed-card {
    flex: 0 0 100%;
  }
}

/* Refine contact info appearance */
.contact-info {
  flex: 1 1 300px;
  background-color: var(--secondary-color);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  font-size: 1rem;
  line-height: 1.8;
}

.contact-info p {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.contact-info i {
  color: var(--accent-color);
  margin-right: 12px;
  font-size: 1.2rem;
}

/* Italicise plain text paragraphs in sections to give einen geschmeidigen Zeitung‑Look */
/* Remove italic styling from paragraphs for better readability */
.company-section p,
.services-section .service-text p,
.about-section p {
  font-style: normal;
}

/* Map container within contact information */
.map-container {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.map-container iframe {
  width: 100%;
  height: 200px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.map-container a {
  font-size: 0.9rem;
  color: var(--accent-color);
  text-decoration: underline;
  align-self: flex-start;
}

/* Position WhatsApp button bottom-right and style image */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  left: auto;
  /* Lasse das Symbol ohne zusätzlichen Rand erscheinen */
  width: 70px;
  height: 70px;
  background-color: transparent;
  border-radius: 0;
  padding: 0;
  overflow: visible;
  z-index: 1000;
  /* Entferne Schatten, nur das Icon selbst wird angezeigt */
  box-shadow: none;
  transition: transform 0.3s ease;
}

/* Slight enlarge on hover */
.whatsapp-float:hover {
  transform: scale(1.15);
}

.whatsapp-float img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Particle background overlay for the hero section */
.particles-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}