/**
 * SKYPhoenix IT - Custom Styles
 * Ergänzende Styles zu Tailwind CSS
 */

/* Root Variablen für Farbschema */
:root {
  --color-primary: #1e3a5f;
  --color-primary-dark: #152a45;
  --color-secondary: #3b82f6;
  --color-accent: #0ea5e9;
  --color-text: #1f2937;
  --color-text-light: #6b7280;
  --color-bg-light: #f8fafc;
  --color-border: #e5e7eb;
}

/* Skip-Link für Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: 8px 16px;
  z-index: 100;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* Sanfte Scroll-Animationen */
html {
  scroll-behavior: smooth;
}

/* Focus-Stile für bessere Accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

/* Navigation Active State */
.nav-link.active {
  color: var(--color-secondary);
  border-bottom: 2px solid var(--color-secondary);
}

/* Card Hover-Effekte */
.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Hero Gradient */
.hero-gradient {
  background: linear-gradient(135deg, #1e3a5f 0%, #152a45 100%) !important;
  background-color: #1e3a5f !important;
}

section.hero-gradient {
  background: linear-gradient(135deg, #1e3a5f 0%, #152a45 100%) !important;
  background-color: #1e3a5f !important;
}

/* Hero Buttons - Explicit Styles für garantierte Sichtbarkeit */
.hero-btn-primary {
  color: #1e3a5f !important;
  background-color: white !important;
}

.hero-btn-primary:hover {
  background-color: #eff6ff !important;
  color: #152a45 !important;
}

.hero-btn-secondary {
  color: white !important;
  background-color: transparent !important;
  border-color: white !important;
}

.hero-btn-secondary:hover {
  background-color: white !important;
  color: #1e3a5f !important;
}

/* Universal Button Fix für alle CTA-Sections */
.hero-gradient a.bg-white,
section.hero-gradient a,
a.bg-white {
  color: #1e3a5f;
}

a.bg-white:hover {
  background-color: #eff6ff !important;
  color: #152a45 !important;
}

/* CTA Sections mit bg-primary */
.bg-primary a.bg-white,
section.bg-primary a.bg-white {
  color: #1e3a5f !important;
  background-color: white !important;
}

.bg-primary a.bg-white:hover,
section.bg-primary a.bg-white:hover {
  background-color: #eff6ff !important;
  color: #152a45 !important;
}

/* Fix für Buttons in Hero Section */
.hero-gradient .btn-primary,
.hero-gradient a.bg-white,
a.bg-white.text-primary {
  color: var(--color-primary) !important;
  background-color: white !important;
}

.hero-gradient a.bg-white:hover {
  background-color: #eff6ff !important;
  color: var(--color-primary-dark) !important;
}

/* Tailwind text-primary Fix */
.text-primary {
  color: var(--color-primary) !important;
}

.bg-primary {
  background-color: #1e3a5f !important;
}

section.bg-primary {
  background-color: #1e3a5f !important;
}

.hover\:bg-primary-dark:hover {
  background-color: var(--color-primary-dark) !important;
}

/* Secondary Color für Links */
.text-secondary {
  color: var(--color-secondary) !important;
}

.hover\:text-primary:hover {
  color: var(--color-primary) !important;
}

/* Kontakt Button in Navigation */
a.bg-primary.text-white,
.bg-primary.text-white {
  background-color: var(--color-primary) !important;
  color: white !important;
}

a.bg-primary.text-white:hover {
  background-color: var(--color-primary-dark) !important;
}

/* Border Buttons */
a.border-white {
  border-color: white !important;
}

/* Toolchain Diagram Styles */
.toolchain-box {
  background: white;
  border: 2px solid var(--color-border);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  transition: border-color 0.2s;
}

.toolchain-box:hover {
  border-color: var(--color-secondary);
}

.toolchain-arrow {
  color: var(--color-secondary);
  font-size: 1.5rem;
  font-weight: bold;
}

/* Logo Placeholder Styles */
.logo-placeholder {
  background: #f1f5f9;
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 0.875rem;
  min-height: 60px;
  padding: 1rem;
}

/* Responsive Tabellen */
.table-responsive {
  overflow-x: auto;
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  a[href]:after {
    content: " (" attr(href) ")";
  }
}

/* =================================
   RESPONSIVE / MOBILE OPTIMIERUNG
   ================================= */

/* Touch-friendly buttons */
@media (max-width: 768px) {
  .btn, button, .nav-link {
    min-height: 44px; /* iOS minimum tap target */
    padding: 12px 16px;
  }

  /* Prevent zoom on input focus */
  input, select, textarea {
    font-size: 16px !important;
  }

  /* Stack navigation on mobile */
  .nav-mobile-stack {
    flex-direction: column;
    gap: 0.5rem;
  }

  /* Reduce padding on mobile */
  section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Full-width cards on mobile */
  .card-grid {
    grid-template-columns: 1fr;
  }

  /* Smaller headings on mobile */
  h1 {
    font-size: 1.75rem !important;
    line-height: 1.2;
  }
  h2 {
    font-size: 1.5rem !important;
  }
  h3 {
    font-size: 1.125rem !important;
  }

  /* Mobile hero adjustments */
  .hero-gradient {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

/* Small phones */
@media (max-width: 375px) {
  h1 {
    font-size: 1.5rem !important;
  }

  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* Tablet landscape and larger */
@media (min-width: 1024px) {
  .container-wide {
    max-width: 1400px;
  }
}

/* Ultra-wide monitors */
@media (min-width: 1920px) {
  .container-wide {
    max-width: 1600px;
  }

  body {
    font-size: 1.0625rem;
  }
}

/* Very large screens (4K, etc.) */
@media (min-width: 2560px) {
  .container-wide {
    max-width: 2000px;
  }

  body {
    font-size: 1.125rem;
  }

  h1 {
    font-size: 4rem !important;
  }
  h2 {
    font-size: 2.5rem !important;
  }
}

/* iOS-specific fixes */
@supports (-webkit-touch-callout: none) {
  input, select, textarea, button {
    -webkit-appearance: none;
    border-radius: 8px;
  }

  /* Safe area for notch phones */
  .safe-area-padding {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .safe-area-bottom {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  }
}

/* Hover only on devices that support it */
@media (hover: hover) {
  .card-hover:hover {
    transform: translateY(-2px);
  }

  .nav-link:hover {
    color: var(--color-secondary);
  }
}

/* No hover on touch devices */
@media (hover: none) {
  .card-hover:hover {
    transform: none;
  }

  .card-hover:active {
    transform: scale(0.98);
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

