/*!
 * TailwindPro Template - Analysis CSS v3.4.0 + NIS2-Dropdown-Fix
 * ZWECK: Nur CSS das Tailwind technisch NICHT kompilieren kann
 * GRÖSSE: < 400 Zeilen (erweitert für NIS2-Fix)
 * 
 * INHALT:
 * 1. Hero-Backgrounds (komplexe Gradienten + URLs)
 * 2. E-Mail-Protection (komplexe Kontext-Selektoren)
 * 3. Joomla-spezifische Overrides
 * 4. Komplexe Animations
 * 5. Print-Styles
 * 6. Legacy-Browser-Support
 * 7. NIS2-Selfcheck Dropdown Fix (HINZUGEFÜGT)
 */

/* ============================================================================
   1. HERO-BACKGROUNDS - Komplexe Gradienten + background-image
   GRUND: Tailwind kann keine komplexen linear-gradient + url() Kombinationen
============================================================================ */

.hero-section {
  background-image: linear-gradient(
    to right,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0.7) 50%,
    rgba(255, 255, 255, 0.1) 65%,
    rgba(255, 255, 255, 0) 100%
  ),
  url("/images/header/securatrust_header.webp");
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
}

.hero-section-itc {
  background-image: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.7) 50%,
    rgba(255, 255, 255, 0.1) 55%,
    rgba(255, 255, 255, 0.1) 100%
  ),
  url("/images/header/securatrust_header_itc.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-section-aiact {
  background-image: url("/images/header/securatrust_header_aiact.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-section-isms {
  background-image: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.9) 40%,
    rgba(255, 255, 255, 0.2) 55%,
    rgba(255, 255, 255, 0.1) 70%,
    rgba(255, 255, 255, 0) 100%
  ),
  url("/images/header/securatrust_header_isms.webp");
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
}

.hero-section-nis {
  background-image: linear-gradient(
    to right,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0.7) 50%,
    rgba(255, 255, 255, 0.1) 65%,
    rgba(255, 255, 255, 0) 100%
  ),
  url("/images/header/securatrust_header_nis.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-section-kontakt {
  background-image: linear-gradient(
    to right,
    rgba(2, 22, 57, 0.9) 10%,
    rgba(2, 22, 57, 0.5) 30%,
    rgba(2, 22, 57, 0.1) 60%,
    rgba(2, 22, 57, 0) 100%
  ),
  url("/images/header/securatrust_header_kontakt.webp");
  background-size: cover;
  background-position: right top;
  background-repeat: no-repeat;
}

.hero-section-ms {
  background-image: linear-gradient(
    to right,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0.7) 40%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  ),
  url("/images/header/securatrust_header_ms.webp");
  background-size: cover;
  background-position: right top;
  background-repeat: no-repeat;
}

.hero-section-profil {
  background-image: linear-gradient(
    to right,
    rgba(0, 86, 179, 0.95) 30%,
    rgba(0, 86, 179, 0.7) 50%,
    transparent 100%
  ),
  url("/images/header/securatrust_header_profil.webp");
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
}

.hero-section-nis2-info {
  background-image: url("/images/header/securatrust_header_nis2_info.webp");
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
}

.hero-section-aiact-info {
  background-image: url("/images/header/securatrust_header_aiact_status.webp");
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
}

.hero-section-dsgvo-info {
  background-image: url("/images/header/securatrust_header_dsgvo_status.webp");
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
}

.hero-section-impressum {
  background-image: linear-gradient(
    to right,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0.7) 30%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  ),
  url("/images/header/securatrust_header_impressum.webp");
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
}

/* ============================================================================
   2. E-MAIL-PROTECTION - Komplexe Kontext-Selektoren
   GRUND: Tailwind kann keine komplexen verschachtelten Selektoren mit :not()
============================================================================ */

/* Kontext-spezifische E-Mail-Protection */
footer .email-protected:not([data-template-text]),
.footer .email-protected:not([data-template-text]),
.main-footer .email-protected:not([data-template-text]) {
  color: #d1d5db; /* gray-300 */
}

footer .email-protected:not([data-template-text]):hover,
.footer .email-protected:not([data-template-text]):hover,
.main-footer .email-protected:not([data-template-text]):hover {
  color: #ffffff;
}

aside .email-protected:not([data-template-text]),
.sidebar .email-protected:not([data-template-text]) {
  color: #4b5563; /* gray-600 */
}

aside .email-protected:not([data-template-text]):hover,
.sidebar .email-protected:not([data-template-text]):hover {
  color: #1f2937; /* gray-800 */
}

main .email-protected:not([data-template-text]),
.content .email-protected:not([data-template-text]),
article .email-protected:not([data-template-text]) {
  color: #0056b3;
}

main .email-protected:not([data-template-text]):hover,
.content .email-protected:not([data-template-text]):hover,
article .email-protected:not([data-template-text]):hover {
  color: #004494;
}

/* Style-Presets */
[data-email-style="minimal"] i {
  display: none;
}

[data-email-style="emphasized"].email-protected {
  border-radius: 0.375rem;
  border: 1px solid rgba(0, 86, 179, 0.2);
  padding: 0.25rem 0.75rem;
  background-color: rgba(0, 86, 179, 0.05);
}

[data-email-style="emphasized"].email-protected:hover {
  background-color: rgba(0, 86, 179, 0.1);
}

/* Impressum-Seiten-Behandlung */
.impressum-page .email-protected {
  cursor: text;
  user-select: text;
  text-decoration: none;
  color: inherit !important;
}

.impressum-page .email-protected:hover {
  text-decoration: none;
}

.impressum-page .email-protected i {
  display: none;
}

/* ============================================================================
   3. JOOMLA-SPEZIFISCHE OVERRIDES
   GRUND: Template-spezifische Fixes die nicht in Tailwind gehören
============================================================================ */

/* Header-Navigation Fix */
#main-header,
header,
.header {
  overflow: visible !important;
}

/* Off-Canvas Body-Lock */
body.offcanvas-open {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
}

/* Navigation Alignment Fix */
#main-header nav[class*="md:flex"] {
  display: flex !important;
  align-items: center !important;
}

#main-header nav > ul:first-of-type {
  display: flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

#main-header nav > ul:first-of-type > li > a {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 44px !important;
  padding: 0.5rem 1rem !important;
}

#main-header nav ul ul {
  display: block !important;
  position: absolute !important;
}

/* ============================================================================
   4. KOMPLEXE ANIMATIONS
   GRUND: Tailwind kann keine @keyframes mit komplexen Verläufen
============================================================================ */

/* FAQ Search Highlighting */
@keyframes highlight {
  0%, 100% {
    background-color: transparent;
  }
  10%, 90% {
    background-color: rgba(59, 130, 246, 0.1);
  }
  50% {
    background-color: rgba(251, 191, 36, 0.2);
  }
}

.search-highlighted {
  animation: highlight 2s ease-in-out;
  border-radius: 0.5rem;
  border: 2px solid rgba(0, 86, 179, 0.5);
}

/* Timeline Hover-Effekt */
.timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 1.25rem;
  top: 2.5rem;
  bottom: -2rem;
  width: 2px;
  background: linear-gradient(to bottom, #e5e7eb, #9ca3af, #e5e7eb);
  z-index: 0;
}

.timeline-item:hover::before {
  background: linear-gradient(to bottom, #3b82f6, #1d4ed8, #3b82f6);
}

/* NIS2-Dropdown Animation */
@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.custom-dropdown.dropdown-open .dropdown-options {
  animation: dropdownFadeIn 0.2s ease-out;
}

/* ============================================================================
   5. PRINT-STYLES
   GRUND: Tailwind Print-Utilities sind zu limitiert für Template-Bedürfnisse
============================================================================ */

@media print {
  /* Universal Print Reset */
  *, *::before, *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  @page {
    size: A4;
    margin: 15mm;
  }

  /* Hide Interactive Elements */
  .no-print,
  button,
  nav,
  aside,
  .dropdown-menu,
  .dropdown-options,
  .custom-dropdown,
  .offcanvas-container,
  .search-results,
  #back-to-top,
  #cookie-banner,
  [data-offcanvas-container] {
    display: none !important;
  }

  /* Body Reset */
  body, html {
    font-size: 11pt !important;
    line-height: 1.4 !important;
    margin: 0;
    background-color: white !important;
    padding: 0;
    color: black !important;
  }

  /* Typography */
  h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: black !important;
    page-break-after: avoid !important;
  }

  h1 { font-size: 18pt !important; }
  h2 { font-size: 16pt !important; }
  h3 { font-size: 14pt !important; }

  /* Container für Print */
  .container, main {
    margin: 0;
    width: 100%;
    max-width: 100%;
    padding: 12pt !important;
  }

  /* E-Mail Protection für Print */
  .email-protected {
    user-select: text;
    color: inherit !important;
    text-decoration: none !important;
  }

  .email-protected i {
    display: none;
  }

  .email-protected::after {
    content: " [E-Mail]";
    font-size: 0.75rem;
    opacity: 0.7;
  }

  /* Remove Backgrounds */
  [class*="bg-"]:not([class*="bg-white"]) {
    background-color: white !important;
  }

  /* NIS2-Selfcheck Print Styles */
  .question-step {
    page-break-inside: avoid;
  }

  .nis2-selfcheck-container {
    border: 1px solid #ccc !important;
    padding: 15pt !important;
    margin-bottom: 15pt !important;
  }

  #industry-info {
    border-left: 3pt solid #0056b3 !important;
    background-color: #f8f9fa !important;
    padding: 10pt !important;
    margin: 10pt 0 !important;
  }
}

/* ============================================================================
   6. LEGACY-BROWSER-SUPPORT
   GRUND: Fallbacks für den Fall dass Tailwind-Plugin nicht funktioniert
============================================================================ */

/* Brand Color Fallbacks */
.bg-primary {
  background-color: #0056b3 !important;
}

.text-primary {
  color: #0056b3 !important;
}

.border-primary {
  border-color: #0056b3 !important;
}

.hover\:bg-primary:hover {
  background-color: #004494 !important;
}

.focus\:ring-primary:focus {
  box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1) !important;
}

/* ============================================================================
   7. NIS2-SELFCHECK DROPDOWN FIX - ROBUSTE CSS-ONLY IMPLEMENTATION
   GRUND: Sicherstellen dass Dropdown funktioniert auch wenn JavaScript fehlschlägt
============================================================================ */

/* NIS2-Dropdown Container - Robuste Basis */
.custom-dropdown {
  position: relative !important;
  width: 100% !important;
  z-index: 10 !important;
  display: block !important;
}

/* Dropdown Selected Button - Klickbarer Bereich */
.dropdown-selected {
  background-color: #ffffff !important;
  border: 1px solid #d1d5db !important;
  border-radius: 0.5rem !important;
  padding: 0.75rem 1rem !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 48px !important;
  width: 100% !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
}

.dropdown-selected:hover {
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.2) !important;
}

.dropdown-selected:focus {
  border-color: #2563eb !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* Selected Text Span */
.dropdown-selected span {
  color: #374151 !important;
  flex: 1 !important;
  text-align: left !important;
  line-height: 1.5 !important;
  font-size: 0.875rem !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.dropdown-selected.placeholder span {
  color: #9ca3af !important;
}

/* Arrow Icon */
.dropdown-selected i {
  color: #6b7280 !important;
  transition: transform 0.2s ease !important;
  margin-left: 0.5rem !important;
  font-size: 1.25rem !important;
  flex-shrink: 0 !important;
  line-height: 1 !important;
}

/* Dropdown Options Container */
.dropdown-options {
  position: absolute !important;
  z-index: 50 !important;
  width: 100% !important;
  margin-top: 0.25rem !important;
  background-color: #ffffff !important;
  border: 1px solid #d1d5db !important;
  border-radius: 0.5rem !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
  max-height: min(24rem, 85vh) !important;
  overflow-y: auto !important;
  left: 0 !important;
  right: 0 !important;
  top: 100% !important;
  
  /* Standard-Zustand: versteckt */
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(-5px) !important;
  transition: all 0.2s ease-in-out !important;
}

/* Open State - Dropdown sichtbar */
.custom-dropdown.dropdown-open .dropdown-options {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

.custom-dropdown.dropdown-open .dropdown-selected {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

.custom-dropdown.dropdown-open .dropdown-selected i {
  transform: rotate(180deg) !important;
}

/* Option Group Headers (Anhang I, Anhang II) */
.dropdown-options [role="group"] {
  padding: 0.5rem 0.75rem !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  background-color: rgba(248, 249, 250, 0.95) !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 1 !important;
  border-bottom: 1px solid #f3f4f6 !important;
}

/* Individual Dropdown Options */
.dropdown-option {
  padding: 0.5rem 0.75rem !important;
  cursor: pointer !important;
  border-bottom: 1px solid #f3f4f6 !important;
  transition: background-color 0.15s ease !important;
  min-height: 40px !important;
  display: flex !important;
  align-items: center !important;
  font-size: 0.875rem !important;
  line-height: 1.25rem !important;
  color: #374151 !important;
}

.dropdown-option:last-child {
  border-bottom: none !important;
}

.dropdown-option:hover {
  background-color: #f9fafb !important;
  color: #1f2937 !important;
}

.dropdown-option:focus {
  background-color: #eff6ff !important;
  color: #1e40af !important;
  outline: none !important;
}

.dropdown-option:active {
  background-color: #dbeafe !important;
}

/* Industry Info Box Styling */
#industry-info {
  margin-top: 1rem !important;
  padding: 1rem !important;
  border-radius: 0.5rem !important;
  background-color: #eff6ff !important;
  border-left: 4px solid #3b82f6 !important;
  transition: all 0.3s ease !important;
}

#industry-info.hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

#industry-info:not(.hidden) {
  opacity: 1 !important;
  visibility: visible !important;
}

#industry-info-text {
  color: #374151 !important;
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
}

/* Responsive Mobile Anpassungen */
@media (max-width: 640px) {
  .dropdown-options {
    max-height: 50vh !important;
  }
  
  .dropdown-option {
    padding: 0.75rem 1rem !important;
    min-height: 48px !important;
    font-size: 1rem !important;
  }
  
  .dropdown-selected {
    min-height: 52px !important;
    padding: 0.875rem 1rem !important;
  }
  
  .dropdown-selected span {
    font-size: 1rem !important;
  }
}

/* Accessibility Verbesserungen */
.dropdown-selected[aria-expanded="true"] {
  border-color: #2563eb !important;
}

.dropdown-option[role="option"]:focus {
  outline: 2px solid #2563eb !important;
  outline-offset: -2px !important;
}

/* Scrollbar Styling für Dropdown */
.dropdown-options::-webkit-scrollbar {
  width: 6px;
}

.dropdown-options::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.dropdown-options::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.dropdown-options::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ============================================================================
   8. DARK MODE SUPPORT (falls CSS-only benötigt)
   GRUND: Komplexe Selektoren für automatische Dark Mode Detection
============================================================================ */

@media (prefers-color-scheme: dark) {
  .email-protected:not([class*="text-"]) {
    color: #d1d5db;
  }

  .email-protected:not([class*="text-"]):hover {
    color: #ffffff;
  }

  .email-protected:focus {
    --tw-ring-color: rgb(96 165 250 / 0.5);
  }

  /* Dark Mode für NIS2-Dropdown */
  .custom-dropdown .dropdown-selected {
    background-color: #1f2937 !important;
    border-color: #374151 !important;
    color: #f9fafb !important;
  }

  .custom-dropdown .dropdown-options {
    background-color: #1f2937 !important;
    border-color: #374151 !important;
  }

  .dropdown-option {
    color: #f9fafb !important;
  }

  .dropdown-option:hover {
    background-color: #374151 !important;
  }
}

/* Debug-Modus für Icon-Zentrierung (nur bei .debug-mode) */
.debug-mode .icon-center {
  background-color: rgba(255, 0, 0, 0.1) !important;
  border: 1px dashed red !important;
}

.debug-mode .icon-center i {
  background-color: rgba(0, 255, 0, 0.1) !important;
}

/* Debug-Modus für NIS2-Dropdown */
.debug-mode .custom-dropdown {
  outline: 2px solid #fbbf24 !important;
}

.debug-mode .dropdown-selected {
  background-color: rgba(254, 243, 199, 0.5) !important;
}

.debug-mode .dropdown-options {
  outline: 2px solid #10b981 !important;
}

.debug-mode .dropdown-option:hover {
  background-color: rgba(252, 165, 165, 0.5) !important;
}

/* NIS2-Selfcheck spezifische Fixes */
.nis2-selfcheck-container .always-visible {
  opacity: 1 !important;
  visibility: visible !important;
  height: auto !important;
  overflow: visible !important;
  margin: revert !important;
  padding: revert !important;
}

/* End of TailwindPro Template Analysis CSS v3.4.0 + NIS2-Dropdown-Fix */