/* ============================================
   TYPO3 Custom Styles: Wegweiser Arbeitsfähigkeit
   Namespace: ww- (Wegweiser)
   Bootstrap 5 kompatibel - keine Konflikte
   ============================================ */

/* Work Sans Font Import */
@import url('https://fonts.googleapis.com/css2?family=Work+Sans:wght@400;500;600;700&display=swap');

/* Root Variables */
:root {
  --ww-primary: #CC0837;
  --ww-beige: #F5F3EE;
  --ww-dark-gray: #4A4A49;
  --ww-darker-gray: #323232;
  --ww-text: #2C2C2C;
  --ww-blue: #005A9C;
  --ww-red: #CC0837;
  --ww-slate: #475569;
  --ww-teal: #0D9488;
  --ww-font: 'Work Sans', sans-serif;
}

/* ---- Global Overrides ---- */
.ww-body {
  font-family: var(--ww-font);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ww-text);
}

/* ---- Header / Top Navigation ---- */
.ww-header {
  z-index: 1050;
  font-family: var(--ww-font);
}

.ww-nav-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  margin: 0 0.15rem;
  font-size: 18px;
  font-weight: 500;
  color: var(--ww-primary);
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.ww-nav-link:hover,
.ww-nav-link.active {
  background-color: #f3f4f6;
  color: var(--ww-primary);
}

/* Mobile Navigation */
.ww-mobile-nav-link {
  display: block;
  font-size: 18px;
  font-weight: 500;
  color: var(--ww-primary);
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s;
}

.ww-mobile-nav-link:hover,
.ww-mobile-nav-link.active {
  background-color: #f3f4f6;
  color: var(--ww-primary);
}

/* ---- Page Header ---- */
.ww-page-header {
  background-color: var(--ww-beige);
}

.ww-icon-circle {
  width: 64px;
  height: 64px;
  min-width: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.ww-icon-circle--primary { background-color: var(--ww-primary); }

/* ---- Sticky Tab Navigation ---- */
.ww-sticky-tabs {
  position: sticky;
  top: 0; /* Wird per JS an Header-Hoehe angepasst */
  z-index: 1040;
  backdrop-filter: blur(8px);
  background-color: rgba(248,249,250,0.95);
}

.ww-tab-btn {
  width: 100%;
  min-height: 60px;
  padding: 0.75rem 1rem;
  background: #fff;
  border: none;
  border-top: 4px solid;
  border-radius: 0.375rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ww-tab-btn h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  color: #1f2937;
  transition: color 0.2s;
}

/* Tab Color Variants */
.ww-tab-btn--blue  { border-top-color: rgba(0,90,156,0.3); }
.ww-tab-btn--red   { border-top-color: rgba(204,8,55,0.3); }
.ww-tab-btn--slate { border-top-color: rgba(71,85,105,0.3); }
.ww-tab-btn--teal  { border-top-color: rgba(13,148,136,0.3); }

.ww-tab-btn--blue.active,
.ww-tab-btn--blue:hover  { background-color: #EFF6FF; border-top-color: var(--ww-blue); }
.ww-tab-btn--blue.active h3,
.ww-tab-btn--blue:hover h3 { color: var(--ww-blue); }

.ww-tab-btn--red.active,
.ww-tab-btn--red:hover   { background-color: #FEF2F2; border-top-color: var(--ww-red); }
.ww-tab-btn--red.active h3,
.ww-tab-btn--red:hover h3 { color: var(--ww-red); }

.ww-tab-btn--slate.active,
.ww-tab-btn--slate:hover { background-color: #F8FAFC; border-top-color: var(--ww-slate); }
.ww-tab-btn--slate.active h3,
.ww-tab-btn--slate:hover h3 { color: var(--ww-slate); }

.ww-tab-btn--teal.active,
.ww-tab-btn--teal:hover  { background-color: #F0FDFA; border-top-color: var(--ww-teal); }
.ww-tab-btn--teal.active h3,
.ww-tab-btn--teal:hover h3 { color: var(--ww-teal); }

/* ---- Tab Content ---- */
.ww-tab-content {
  display: none;
}

.ww-tab-content.active {
  display: block;
  animation: wwFadeIn 0.4s ease;
}

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

/* ---- Sticky Sidebar ---- */
.ww-sidebar {
  position: sticky;
  top: 220px; /* Header + Tabs + Padding */
}

.ww-sidebar-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ww-sidebar-link {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 14px;
  color: #4b5563;
  text-decoration: none;
  border-radius: 0.375rem;
  border-left: 2px solid transparent;
  transition: all 0.2s;
}

.ww-sidebar-link:hover {
  background-color: #f3f4f6;
  color: #1f2937;
  text-decoration: none;
}

.ww-sidebar-link.active {
  font-weight: 600;
}

.ww-sidebar-link-sub {
  display: block;
  padding: 0.375rem 0.5rem;
  font-size: 12px;
  color: #6b7280;
  text-decoration: none;
  border-radius: 0.375rem;
  transition: all 0.2s;
}

.ww-sidebar-link-sub:hover {
  color: #1f2937;
  text-decoration: none;
}

/* Sidebar color variants - Blue */
[data-ww-color="blue"] .ww-sidebar-link.active {
  color: var(--ww-blue);
  background-color: #EFF6FF;
  border-left-color: var(--ww-blue);
}
[data-ww-color="blue"] .ww-sidebar-link:hover {
  background-color: #EFF6FF;
  color: var(--ww-blue);
}

/* Sidebar color variants - Red */
[data-ww-color="red"] .ww-sidebar-link.active {
  color: var(--ww-red);
  background-color: #FEF2F2;
  border-left-color: var(--ww-red);
}
[data-ww-color="red"] .ww-sidebar-link:hover {
  background-color: #FEF2F2;
  color: var(--ww-red);
}

/* Sidebar color variants - Slate */
[data-ww-color="slate"] .ww-sidebar-link.active {
  color: var(--ww-slate);
  background-color: #F8FAFC;
  border-left-color: var(--ww-slate);
}
[data-ww-color="slate"] .ww-sidebar-link:hover {
  background-color: #F8FAFC;
  color: var(--ww-slate);
}

/* Sidebar color variants - Teal */
[data-ww-color="teal"] .ww-sidebar-link.active {
  color: var(--ww-teal);
  background-color: #F0FDFA;
  border-left-color: var(--ww-teal);
}
[data-ww-color="teal"] .ww-sidebar-link:hover {
  background-color: #F0FDFA;
  color: var(--ww-teal);
}

/* ---- Accent Bars ---- */
.ww-accent-bar {
  width: 4px;
  height: 24px;
  border-radius: 2px;
  display: inline-block;
}

.ww-accent-bar-lg {
  width: 8px;
  height: 32px;
  border-radius: 2px;
  display: inline-block;
}

/* Color utility classes (namespaced) */
.ww-bg-blue    { background-color: var(--ww-blue); }
.ww-bg-red     { background-color: var(--ww-red); }
.ww-bg-slate   { background-color: var(--ww-slate); }
.ww-bg-teal    { background-color: var(--ww-teal); }
.ww-bg-beige   { background-color: var(--ww-beige); }
.ww-bg-dark-gray   { background-color: var(--ww-dark-gray); }
.ww-bg-darker-gray { background-color: var(--ww-darker-gray); }

.ww-text-blue  { color: var(--ww-blue); }
.ww-text-red   { color: var(--ww-red); }
.ww-text-slate { color: var(--ww-slate); }
.ww-text-teal  { color: var(--ww-teal); }

/* ---- Colored Info Boxes ---- */
.ww-box--blue {
  background-color: rgba(239,246,255,0.5);
  border: 1px solid #93C5FD;
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.ww-box--red {
  background-color: rgba(254,242,242,0.5);
  border: 1px solid #FECACA;
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.ww-box--slate {
  background-color: rgba(248,250,252,0.5);
  border: 1px solid #CBD5E1;
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.ww-box--teal {
  background-color: rgba(240,253,250,0.5);
  border: 1px solid #5EEAD4;
  border-radius: 0.5rem;
  padding: 1.5rem;
}

/* ---- Anchor scroll offset ---- */
.ww-anchor {
  scroll-margin-top: 288px;
}

/* ---- Content Sections ---- */
.ww-content {
  line-height: 1.75;
}

.ww-content .lead {
  font-size: 1.125rem;
  line-height: 1.75;
}

/* ---- Footer ---- */
.ww-footer {
  font-family: var(--ww-font);
}

.ww-footer-link {
  color: #d1d5db;
  text-decoration: none;
  transition: all 0.2s;
}

.ww-footer-link:hover {
  color: white;
  text-decoration: underline;
}

.ww-social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ww-primary);
  text-decoration: none;
  transition: all 0.3s;
}

.ww-social-icon:hover {
  background-color: #e5e7eb;
  transform: scale(1.1);
  color: var(--ww-primary);
}

/* ---- Hero Section (Startseite) ---- */
.ww-hero {
  position: relative;
  min-height: 500px;
}

.ww-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}

.ww-hero-card {
  background: rgba(255,255,255,0.95);
  border-top: 8px solid var(--ww-primary);
  border-radius: 0.5rem;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}

/* ---- Target Group Cards ---- */
.ww-card {
  transition: all 0.3s;
  border: 1px solid #f3f4f6;
  overflow: hidden;
}

.ww-card:hover {
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.ww-card:hover .ww-card-bar {
  background-color: var(--ww-primary);
}

.ww-card:hover .ww-card-title {
  color: var(--ww-primary);
}

.ww-card:hover .ww-card-img {
  transform: scale(1.05);
}

.ww-card-img {
  transition: transform 0.5s;
}

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
  .ww-sticky-tabs {
    top: 56px; /* Bootstrap default navbar-height auf Mobile */
  }

  .ww-sidebar {
    position: static;
  }

  .ww-anchor {
    scroll-margin-top: 180px;
  }

  .ww-nav-link {
    font-size: 16px;
    padding: 0.375rem 0.75rem;
  }
}

@media (max-width: 575.98px) {
  .ww-tab-btn {
    min-height: 48px;
  }

  .ww-tab-btn h3 {
    font-size: 12px;
  }
}
/* Ergänzugen*/

.ww-tab-btn h3 a {
    display: block;
    width: 100%;
    height: 100%;
    color: inherit; /* Verhindert das typische Link-Blau */
    text-decoration: none;
}
