/* Base */
html {
  scroll-behavior: smooth;
}

/* Mobile menu slide transition */
#mobile-menu {
  transition: max-height 0.25s ease-in-out, opacity 0.2s ease;
}

/* Card hover lift */
.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
}

/* Gallery image zoom */
.gallery-item {
  overflow: hidden;
}

.gallery-item img {
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

/* Form input focus ring */
.form-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 179, 215, 0.25);
  border-color: #00b3d7;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Active nav link */
.nav-active {
  color: #38bdf8 !important;
}

/* Page hero pattern overlay */
.hero-grid {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2300b3d7' fill-opacity='0.07'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Error state for form fields */
.field-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

/* Success message */
.form-success {
  display: none;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Skip-to-content link (WCAG 2.4.1 Bypass Blocks) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 9999;
}
.skip-link:focus,
.skip-link:focus-visible {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  display: block;
  padding: 0.75rem 1.5rem;
  background-color: #00b3d7;
  color: white;
  font-weight: 600;
  text-decoration: none;
}

/* Lightbox overlay (F-037) */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.88);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox-overlay--open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-img {
  display: block;
  max-width: calc(100vw - 2rem);
  max-height: calc(100dvh - 5rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

.lightbox-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 9001;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.lightbox-close-btn:hover {
  background-color: rgba(255, 255, 255, 0.30);
}

.lightbox-close-btn:focus-visible {
  outline: 3px solid #38bdf8;
  outline-offset: 2px;
}

/* Print styles — prevent dark backgrounds from printing as black */
@media print {
  /* Hide interactive elements not useful in print */
  #menu-toggle,
  #mobile-menu {
    display: none !important;
  }

  /* Header: white background, readable text, no sticky */
  #site-header {
    background-color: white !important;
    color: black !important;
    position: static !important;
    box-shadow: none !important;
  }

  #site-header a,
  #site-header nav a {
    color: black !important;
  }

  /* Footer: white background, readable text */
  footer {
    background-color: white !important;
    color: black !important;
  }

  footer a,
  footer p {
    color: black !important;
  }

  /* Dark section backgrounds → white */
  .bg-slate-900,
  .bg-slate-800 {
    background-color: white !important;
    color: black !important;
  }

  /* Remove decorative SVG background pattern */
  .hero-grid {
    background-image: none !important;
  }

  /* Light text on dark backgrounds → black */
  .text-white,
  .text-slate-300,
  .text-slate-400,
  .text-slate-500 {
    color: black !important;
  }

  /* Brand accent colours → black */
  .text-sky-400,
  .text-sky-500,
  .text-sky-600 {
    color: black !important;
  }

  /* CTA buttons: border outline instead of coloured fill */
  .bg-sky-500,
  .bg-sky-600 {
    background-color: white !important;
    color: black !important;
    border: 1px solid black !important;
  }

  /* Remove transitions and animations */
  *,
  .card-hover {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }

  /* Hide back-to-top button in print */
  .back-to-top {
    display: none !important;
  }

  /* Hide lightbox in print */
  .lightbox-overlay {
    display: none !important;
  }
}

/* Back-to-top button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 40;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background-color: #00b3d7;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, background-color 0.2s ease;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  background-color: #0284c7;
}

.back-to-top:focus-visible {
  outline: 3px solid #38bdf8;
  outline-offset: 2px;
}

/* Dev review marker — visuelle Platzhalter-Markierung für Kundenpräsentation. Klasse entfernen sobald echter Inhalt eingesetzt ist. */
.dev-review {
  position: relative;
  outline: 2px dashed #f59e0b;
  outline-offset: 5px;
}
span.dev-review {
  display: inline-block;
}
