/* ================================================
   FOOTER LINKS - VERSION 3: ARCHITECT'S CHOICE
   Zaha Hadid, Norman Foster Style
   ================================================ */

/* Footer Container */
.footer-content {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  margin-top: 40px;
  margin-bottom: 40px;
}

/* Footer Spalten */
.footer-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 6px;
  flex: 0 0 auto;
}

/* Footer Subcolumns - für Qualitätsmanagement */
.footer-subcolumns {
  display: flex;
  gap: 12px;
}

.footer-subcolumn {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 auto;
}

.footer-column-title {
  margin: 0 0 12px 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.2px;
  color: var(--color-fg-default);
  text-transform: uppercase;
  font-family: 'Futura', 'Century Gothic', sans-serif;
  position: relative;
  padding-left: 12px;
}

/* Asymmetrische Akzent-Linie (Architektur-Signatur) */
.footer-column-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.1) 100%
  );
}

/* Footer Resource Links - Architect Style */
.footer-resource-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  max-width: 180px;
  padding: 8px 12px;
  position: relative;
  overflow: hidden;

  /* Monolithisches Design */
  background: linear-gradient(
    125deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.01) 100%
  );
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  /* Asymmetrischer Border */
  border-left: 1.5px solid rgba(255, 255, 255, 0.15);
  border-top: 0.5px solid rgba(255, 255, 255, 0.08);
  border-right: 0.5px solid rgba(255, 255, 255, 0.08);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 0; /* Streng geometrisch */

  /* Architektur-Schatten */
  box-shadow:
    2px 2px 8px rgba(0, 0, 0, 0.1),
    -1px -1px 2px rgba(255, 255, 255, 0.01);

  /* Typography */
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  font-weight: 400;
  text-decoration: none;
  text-align: left;
  letter-spacing: 0.2px;
  font-family: 'Futura', 'Century Gothic', sans-serif;

  /* Smooth Architectural Motion */
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Licht-Wanderungs-Effekt (wie Sonne über Gebäude) */
.footer-resource-link::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -100%;
  width: 100%;
  height: 200%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 100%
  );
  transform: skewX(-25deg);
  transition: left 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

.footer-resource-link:hover::before {
  left: 150%;
}

/* Material-Depth Overlay */
.footer-resource-link::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05) 0%,
    transparent 50%,
    rgba(0, 0, 0, 0.05) 100%
  );
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  pointer-events: none;
  mix-blend-mode: overlay;
}

.footer-resource-link:hover::after {
  opacity: 1;
}

.footer-resource-link:hover {
  transform: translateX(6px) translateY(-3px);
  border-left-color: rgba(255, 255, 255, 0.4);

  box-shadow:
    12px 12px 36px rgba(0, 0, 0, 0.25),
    -3px -3px 12px rgba(255, 255, 255, 0.03);

  color: #ffffff;

  background: linear-gradient(
    125deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
}

.footer-resource-link:active {
  transform: translateX(3px) translateY(-1px);
}

/* Negative Space Indicator - Blau statt Grün */
.footer-column:first-child .footer-resource-link {
  border-left-color: rgba(100, 150, 255, 0.3);
}

.footer-column:first-child .footer-resource-link:hover {
  border-left-color: rgba(100, 150, 255, 0.6);
}

/* Mittlere Spalte - QM-Konzepte */
.footer-column:nth-child(2) .footer-resource-link {
  border-left-color: rgba(90, 135, 255, 0.3);
}

.footer-column:nth-child(2) .footer-resource-link:hover {
  border-left-color: rgba(90, 135, 255, 0.6);
}

.footer-column:last-child .footer-resource-link {
  border-left-color: rgba(80, 120, 255, 0.3);
}

.footer-column:last-child .footer-resource-link:hover {
  border-left-color: rgba(80, 120, 255, 0.6);
}

/* Glassmorphism Theme Support */
:root[data-theme="glass"] .footer-resource-link {
  background: linear-gradient(
    125deg,
    rgba(0, 10, 25, 0.3) 0%,
    rgba(0, 10, 25, 0.1) 100%
  );
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}

:root[data-theme="glass"] .footer-resource-link:hover {
  background: linear-gradient(
    125deg,
    rgba(26, 95, 180, 0.25) 0%,
    rgba(0, 10, 25, 0.2) 100%
  );
}

/* Footer Bottom - Copyright & Legal */
.footer-bottom {
  text-align: center;
  padding-top: 60px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.footer-bottom::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 120px;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.3) 0%,
    transparent 100%
  );
}

.footer-bottom p {
  margin: 0;
  margin-bottom: 18px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 1px;
  font-weight: 300;
}

/* ================================================
   MOBILE OPTIMIERUNG
   ================================================ */

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    align-items: center;
    gap: 60px;
    margin-bottom: 60px;
  }

  .footer-column {
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .footer-column-title {
    padding-left: 0;
    padding-top: 20px;
  }

  .footer-column-title::before {
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    width: 60px;
    height: 2px;
  }

  .footer-subcolumns {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .footer-subcolumn {
    align-items: center;
    width: 100%;
  }

  .footer-resource-link {
    max-width: 100%;
    font-size: 14px;
    min-height: 56px;
    justify-content: center;
    border-left-width: 1px;
    border-top-width: 3px;
  }

  /* Mobile: Border-Top Farben für alle Spalten */
  .footer-column:first-child .footer-resource-link {
    border-top-color: rgba(100, 150, 255, 0.3);
  }

  .footer-column:first-child .footer-resource-link:hover {
    border-top-color: rgba(100, 150, 255, 0.6);
  }

  .footer-column:nth-child(2) .footer-resource-link {
    border-top-color: rgba(90, 135, 255, 0.3);
  }

  .footer-column:nth-child(2) .footer-resource-link:hover {
    border-top-color: rgba(90, 135, 255, 0.6);
  }

  .footer-column:last-child .footer-resource-link {
    border-top-color: rgba(80, 120, 255, 0.3);
  }

  .footer-column:last-child .footer-resource-link:hover {
    border-top-color: rgba(80, 120, 255, 0.6);
  }

  .footer-resource-link:hover {
    transform: translateY(-3px);
  }

  .footer-bottom {
    padding-top: 48px;
  }

  .footer-bottom::before {
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (max-width: 480px) {
  .footer-content {
    gap: 48px;
  }

  .footer-column-title {
    font-size: 15px;
    margin-bottom: 22px;
  }

  .footer-resource-link {
    font-size: 13px;
    padding: 16px 24px;
  }

  .footer-bottom p {
    font-size: 11px;
    line-height: 1.6;
  }
}

/* ================================================
   FOOTER TERM BUTTONS
   Buttons für Modal-Trigger im Footer
   ================================================ */

.footer-term-btn {
  cursor: pointer;
  text-align: left;
}

.footer-term-btn:focus {
  outline: 2px solid rgba(255, 255, 255, 0.4);
  outline-offset: 2px;
}

.footer-term-btn:focus:not(:focus-visible) {
  outline: none;
}

.footer-term-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.4);
  outline-offset: 2px;
}

/* ================================================
   TERM MODAL STYLES - Dark Tech/Joystick Design
   Sehr dunkel, schwarz, technisch-präzise
   ================================================ */

/* Modal Overlay */
.term-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200000;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.term-modal-overlay.is-visible {
  opacity: 1;
}

/* Modal Dialog - Dark Tech Look */
.modal-term {
  position: relative;
  width: 480px;
  max-width: 100%;
  max-height: calc(100vh - 48px);
  
  /* Eckiges Tech-Design */
  border-radius: 3px;
  
  /* Sehr dunkler/schwarzer Hintergrund */
  background: rgba(8, 8, 12, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  
  /* Tech Border - fein und präzise */
  border: 1px solid rgba(255, 255, 255, 0.08);
  
  /* Subtiler Tech-Glow */
  box-shadow: 
    0 24px 48px -12px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 1px 0 rgba(255, 255, 255, 0.05) inset;
  
  /* Animation */
  transform: translateY(12px);
  opacity: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-term.is-visible {
  transform: translateY(0);
  opacity: 1;
}

/* Modal Header - Dark Tech */
.modal-term .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 3px 3px 0 0;
}

.modal-term .modal-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.3px;
  margin: 0;
  text-transform: uppercase;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* Close Button - Tech/Joystick Style */
.term-modal-close {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.term-modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
}

/* Modal Body - Dark */
.term-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  line-height: 1.6;
  background: rgba(0, 0, 0, 0.15);
}

/* Scrollbar - Minimal Dark */
.term-modal-body::-webkit-scrollbar {
  width: 4px;
}

.term-modal-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.term-modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.term-modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* Intro-Paragraph */
.term-modal-body .modal-intro {
  font-size: 13px;
  margin: 0 0 16px 0;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.65;
}

.term-modal-body .modal-intro strong {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
}

/* Section Titles - Tech Style */
.term-modal-body .modal-section-title {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin: 18px 0 10px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Listen - Dark Minimal */
.term-modal-body .modal-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px 0;
}

.term-modal-body .modal-list li {
  position: relative;
  padding: 7px 0 7px 12px;
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  border-left: 2px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.12s ease;
}

.term-modal-body .modal-list li:hover {
  border-left-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.85);
}

.term-modal-body .modal-list li strong {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

/* Nummerierte Liste - Tech Badges */
.term-modal-body .modal-list-numbered {
  counter-reset: list-counter;
}

.term-modal-body .modal-list-numbered li {
  counter-increment: list-counter;
  padding-left: 28px;
  border-left: none;
}

.term-modal-body .modal-list-numbered li::before {
  content: counter(list-counter);
  position: absolute;
  left: 0;
  top: 7px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
}

.term-modal-body .modal-list-numbered li:hover::before {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
}

/* Info-Box - Dark Tech Panel */
.term-modal-body .modal-info-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 2px solid rgba(255, 255, 255, 0.15);
  padding: 12px 14px;
  margin-top: 16px;
  border-radius: 2px;
}

.term-modal-body .modal-info-box p {
  font-size: 12px;
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.5;
}

.term-modal-body .modal-info-box strong {
  color: rgba(255, 255, 255, 0.85);
}

.term-modal-body .modal-info-box-muted {
  border-left-color: rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
}

/* Reaktionskette - Tech Flowchart */
.term-modal-body .modal-chain {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1px;
  margin: 14px 0;
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 2px;
}

.term-modal-body .chain-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 14px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  color: rgba(255, 255, 255, 0.75);
  transition: all 0.12s ease;
}

.term-modal-body .chain-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

.term-modal-body .chain-arrow {
  color: rgba(255, 255, 255, 0.2);
  font-size: 12px;
  text-align: center;
  padding: 3px 0;
}

/* Modal Footer - Dark */
.modal-term .modal-footer {
  display: flex;
  justify-content: flex-end;
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0 0 3px 3px;
}

/* Footer Button - Tech Style */
.modal-term .modal-footer .btn {
  padding: 8px 18px;
  min-height: 34px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.modal-term .modal-footer .btn-primary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.75);
}

.modal-term .modal-footer .btn-primary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.95);
}

/* ================================================
   GLASSMORPHISM THEME - Dunkler Glass-Effekt
   ================================================ */

:root[data-theme="glass"] .term-modal-overlay {
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

:root[data-theme="glass"] .modal-term {
  background: rgba(4, 6, 12, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-color: rgba(60, 130, 220, 0.1);
  box-shadow: 
    0 24px 48px -12px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(60, 130, 220, 0.05) inset;
}

:root[data-theme="glass"] .modal-term .modal-header {
  background: rgba(0, 0, 0, 0.5);
  border-bottom-color: rgba(60, 130, 220, 0.08);
}

:root[data-theme="glass"] .term-modal-close:hover {
  background: rgba(60, 130, 220, 0.12);
  border-color: rgba(60, 130, 220, 0.2);
}

:root[data-theme="glass"] .modal-term .modal-footer {
  background: rgba(0, 0, 0, 0.5);
  border-top-color: rgba(60, 130, 220, 0.08);
}

:root[data-theme="glass"] .modal-term .modal-footer .btn-primary:hover {
  background: rgba(60, 130, 220, 0.15);
  border-color: rgba(60, 130, 220, 0.25);
}

/* ================================================
   MOBILE RESPONSIVE - Dark Tech für Touch-Geräte
   ================================================ */

@media (max-width: 768px) {
  .term-modal-overlay {
    padding: 0;
    align-items: flex-end;
    background: rgba(0, 0, 0, 0.92);
  }

  .modal-term {
    width: 100%;
    max-height: calc(100vh - 0px);
    max-height: calc(100dvh - 0px);
    
    /* Eckig bleiben - Tech Look */
    border-radius: 3px 3px 0 0;
    
    /* Noch dunkler auf Mobile */
    background: rgba(6, 6, 10, 0.99);
    
    /* Slide-Up Animation */
    transform: translateY(100%);
  }

  .modal-term.is-visible {
    transform: translateY(0);
  }

  /* Header - kompakt & dunkel */
  .modal-term .modal-header {
    padding: 14px 16px;
    border-radius: 3px 3px 0 0;
    background: rgba(0, 0, 0, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  }

  .modal-term .modal-title {
    font-size: 13px;
    letter-spacing: 0.5px;
  }

  /* Close Button - Touch-optimiert */
  .term-modal-close {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
  }

  .term-modal-close:active {
    background: rgba(255, 255, 255, 0.1);
  }

  /* Body - Lesbar auf Mobile */
  .term-modal-body {
    padding: 16px;
    font-size: 14px;
    line-height: 1.65;
    background: rgba(0, 0, 0, 0.2);
    -webkit-overflow-scrolling: touch;
  }

  .term-modal-body .modal-intro {
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 18px;
  }

  .term-modal-body .modal-section-title {
    font-size: 10px;
    letter-spacing: 1px;
    margin: 22px 0 12px 0;
    padding-bottom: 8px;
  }

  /* Listen - Größere Touch-Targets */
  .term-modal-body .modal-list li {
    padding: 10px 0 10px 14px;
    font-size: 13px;
    line-height: 1.55;
    border-left-width: 2px;
  }

  .term-modal-body .modal-list-numbered li {
    padding-left: 32px;
  }

  .term-modal-body .modal-list-numbered li::before {
    width: 20px;
    height: 20px;
    font-size: 11px;
    top: 10px;
  }

  /* Info-Box */
  .term-modal-body .modal-info-box {
    padding: 14px;
    background: rgba(0, 0, 0, 0.4);
  }

  .term-modal-body .modal-info-box p {
    font-size: 13px;
    line-height: 1.55;
  }

  /* Chain - kompakter */
  .term-modal-body .modal-chain {
    padding: 10px;
    margin: 16px 0;
  }

  .term-modal-body .chain-item {
    padding: 10px 14px;
    font-size: 12px;
  }

  .term-modal-body .chain-arrow {
    font-size: 10px;
    padding: 2px 0;
  }

  /* Footer - Dark mit Safe Area */
  .modal-term .modal-footer {
    padding: 14px 16px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    background: rgba(0, 0, 0, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 0;
  }

  .modal-term .modal-footer .btn {
    flex: 1;
    justify-content: center;
    min-height: 46px;
    font-size: 12px;
    letter-spacing: 0.8px;
  }

  .modal-term .modal-footer .btn-primary:active {
    background: rgba(255, 255, 255, 0.12);
  }
}

/* ================================================
   SMALL MOBILE (< 480px) - Vollbild Dark Tech
   ================================================ */

@media (max-width: 480px) {
  .term-modal-overlay {
    background: rgba(0, 0, 0, 0.95);
  }

  .modal-term {
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
    background: rgba(4, 4, 8, 1);
  }

  .modal-term .modal-header {
    padding: 16px;
    border-radius: 0;
  }

  .modal-term .modal-title {
    font-size: 12px;
  }

  .term-modal-body {
    padding: 14px 16px;
  }

  .term-modal-body .modal-intro {
    font-size: 13px;
  }

  .term-modal-body .modal-list li {
    font-size: 12px;
    padding: 9px 0 9px 12px;
  }

  .modal-term .modal-footer {
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .modal-term .modal-footer .btn {
    min-height: 48px;
  }
}

/* ================================================
   LANDSCAPE MOBILE - Kompakt & Zentriert
   ================================================ */

@media (max-height: 500px) and (orientation: landscape) {
  .term-modal-overlay {
    align-items: center;
    padding: 8px;
    background: rgba(0, 0, 0, 0.9);
  }

  .modal-term {
    max-width: 520px;
    max-height: calc(100vh - 16px);
    border-radius: 3px;
    transform: translateY(12px);
  }

  .modal-term.is-visible {
    transform: translateY(0);
  }

  .modal-term .modal-header {
    padding: 10px 14px;
    border-radius: 3px 3px 0 0;
  }

  .modal-term .modal-title {
    font-size: 11px;
  }

  .term-modal-close {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
  }

  .term-modal-body {
    padding: 10px 14px;
    font-size: 12px;
  }

  .term-modal-body .modal-intro {
    font-size: 12px;
    margin-bottom: 12px;
  }

  .term-modal-body .modal-section-title {
    font-size: 9px;
    margin: 14px 0 8px 0;
  }

  .term-modal-body .modal-list li {
    padding: 6px 0 6px 10px;
    font-size: 11px;
  }

  .modal-term .modal-footer {
    padding: 10px 14px;
  }

  .modal-term .modal-footer .btn {
    min-height: 36px;
    font-size: 11px;
  }
}

/* ================================================
   ACCESSIBILITY ENHANCEMENTS
   ================================================ */

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .term-modal-overlay,
  .modal-term,
  .term-modal-body .modal-list li,
  .term-modal-body .chain-item,
  .term-modal-close,
  .modal-term .modal-footer .btn {
    transition: none;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .modal-term {
    border: 2px solid rgba(255, 255, 255, 0.5);
  }

  .term-modal-body .modal-list li {
    border-left-width: 3px;
  }

  .term-modal-body .modal-info-box {
    border-left-width: 4px;
    border-color: rgba(255, 255, 255, 0.3);
  }
}

/* Focus Visible - A11Y Panel */
.a11y-focus-visible .term-modal-close:focus,
.a11y-focus-visible .modal-term .btn:focus {
  outline: 3px solid #ffcc00;
  outline-offset: 2px;
}

/* Dark Reader / Forced Colors */
@media (forced-colors: active) {
  .modal-term {
    border: 2px solid CanvasText;
  }

  .term-modal-close,
  .modal-term .modal-footer .btn {
    border: 1px solid CanvasText;
  }
}
