/* ==========================================================================
   OFFIZIELLES BERLIN.DE DESIGN SYSTEM - CSS (KOMPLETTVERSION)
   ========================================================================== */

/* 1. VARIABLEN & COLOR PALETTE
   -------------------------------------------------------------------------- */
:root {
  --berlin-red: #e40422;          /* Primäres Berlin-Rot */
  --berlin-red-hover: #b80017;    /* Dunkleres Rot für Focus/Hover */
  --berlin-black: #1a1a1a;        /* Haupttext (Schwarz 90%) */
  --berlin-dark-gray: #333333;   /* Sekundärtext */
  --berlin-mid-gray: #767676;    /* Diskrete Borders / Metadaten */
  --berlin-light-gray: #f3f3f3;  /* Hintergründe / Cards / Footer */
  --berlin-border-gray: #e0e0e0; /* Abgrenzungslinien */
  --berlin-white: #ffffff;
  
  /* System-Variablen */
  --font-family-base: "Arial", "Helvetica Neue", Helvetica, sans-serif;
  --max-width: 1200px;
  --radius-base: 6px;
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 2. BASE RESET & TYPOGRAFIE
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family-base);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--berlin-black);
  background-color: #fcfcfc;
  -webkit-font-smoothing: antialiased;
}

/* 3. HEADER & MARKENBALKEN (HEADER)
   -------------------------------------------------------------------------- */
.site-header {
  background-color: var(--berlin-white);
  border-bottom: 1px solid var(--berlin-border-gray);
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
  display: flex;
  justify-content: space-between; /* Schiebt Inhalt nach links und rechts außen */
  align-items: center;            /* Zentriert die Elemente vertikal */
  padding: 10px 20px;
}

/* Der rote Akzentstreifen ganz oben auf Berlin.de */
.site-header::before {
  content: "";
  display: block;
  height: 6px;
  background-color: var(--berlin-red);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Der linke Container, der Button und Logo hält */
.header-left {
  display: flex;
  align-items: center;  /* Zentriert Button und Logo perfekt auf einer Linie */
  gap: 15px;            /* Einheitlicher Abstand zwischen Button und Logo */
}

/* Das optimierte Styling für den Burger-Button */
.menu-toggle-btn {
  background: none;
  border: 1px solid var(--berlin-border-gray, #e0e0e0);
  border-radius: 4px;
  padding: 6px 10px;    
  cursor: pointer;
  display: inline-flex; 
  align-items: center;
  justify-content: center;
  color: var(--berlin-dark-gray, #333333);
  transition: all 0.15s ease-in-out;
  height: 38px;         
  background-color: #fcfcfc;
}

/* Hover-Effekt im Berliner Stil */
.menu-toggle-btn:hover,
.menu-toggle-btn:focus {
  background-color: var(--berlin-light-gray, #f3f3f3);
  border-color: var(--berlin-mid-gray, #767676);
  color: var(--berlin-red, #e40422); 
  outline: none;
}

.menu-toggle-btn svg {
  display: block;
  width: 22px;
  height: 22px;
}

/* Logo-Typografie im Stil der Dachmarke */
.brand-logo {
  display: flex;
  align-items: center;  
  gap: 15px;           
  text-decoration: none;
  color: var(--berlin-black);
}

.brand-logo .logo-text {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--berlin-red);
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

.brand-logo .sub-title {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--berlin-dark-gray);
  border-left: 1px solid var(--berlin-mid-gray);
  padding-left: 10px;
}

/* Logo-Bild Einstellungen */
.logo-img {
  height: 45px;         
  width: auto;          
  display: block;
  object-fit: contain;  
}

/* Die Link-Leiste oben rechts stylen */
.header-meta-nav {
  display: flex;
  gap: 20px; 
}

.header-meta-nav a {
  text-decoration: none;
  color: var(--berlin-dark-gray);
  font-size: 0.85rem;             
}

.header-meta-nav a:hover {
  text-decoration: underline;
}

/* 4. LAYOUT GRID (SIDEBAR + MAIN CONTENT)
   -------------------------------------------------------------------------- */
.page-wrapper {
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 280px 1fr; 
  gap: 2.5rem;
}

/* Wenn das Menü zugeklappt ist, schalten wir das Grid ab */
.page-wrapper.sidebar-hidden {
  display: block; 
}

.page-wrapper.sidebar-hidden .sidebar-nav {
  display: none;
}

.page-wrapper.sidebar-hidden .main-content {
  width: 100%;
}

@media (max-width: 850px) {
  .page-wrapper {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 1rem auto;
  }
  .page-wrapper:not(.sidebar-hidden) {
    display: grid;
  }
}

@media (max-width: 850px) {
  /* Erzwingt das Ausblenden auf Mobilgeräten, wenn die Klasse aktiv ist */
  .page-wrapper.sidebar-hidden .sidebar-nav {
    display: none !important;
  }
}

/* 5. NAVIGATION / SEITENMENÜ (LEFT SIDEBAR)
   -------------------------------------------------------------------------- */
.sidebar-nav {
  background-color: var(--berlin-light-gray);
  border-radius: var(--radius-base);
  padding: 1rem;
}

.sidebar-nav ul {
  list-style: none;
}

.sidebar-nav li {
  margin-bottom: 0.25rem;
}

.sidebar-nav a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--berlin-black);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 4px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-nav a:hover {
  background-color: #e8e8e8;
  color: var(--berlin-red);
}

.sidebar-nav a.active {
  background-color: var(--berlin-red);
  color: var(--berlin-white);
}

/* 6. INHALTSBEREICH & LISTEN (MAIN CONTENT)
   -------------------------------------------------------------------------- */
.main-content h1 {
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1.5rem;
  color: var(--berlin-black);
  border-bottom: 3px solid var(--berlin-red);
  padding-bottom: 0.5rem;
}

.main-content h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

/* Styling für die offizielle Aufzählungsliste */
.berlin-bullet-list {
  list-style-type: square;       
  padding-left: 1.5rem;          
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.berlin-bullet-list li {
  margin-bottom: 1rem;           
  color: var(--berlin-black);
  line-height: 1.6;
}

.berlin-bullet-list strong {
  color: var(--berlin-red);      
}

/* 7. OFFIZIELLE DUNKELGRAUE FUSSZEILE (FOOTER)
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: #545454 !important; 
  color: #ffffff !important;             
  border-top: 4px solid #e40422;        
  padding: 2.5rem 1.5rem;
  margin-top: 4rem;
  font-size: 0.85rem;
  width: 100%;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-container p {
  color: #ffffff !important;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin-top: 0.5rem;
}

.footer-links a {
  color: #ffffff !important;
  text-decoration: none;
}

.footer-links a:hover {
  color: #e40422 !important; 
  text-decoration: underline;
}

/* 8. BUTTONS & AKTIONSELEMENTE (ANMELDUNG & DOWNLOAD)
   -------------------------------------------------------------------------- */
.action-area {
  margin-top: 2.5rem;       
  margin-bottom: 2.5rem;    
  display: flex;            
  justify-content: center;  
}

.btn-berlin-primary {
  display: inline-block;
  background-color: var(--berlin-red, #e40422);
  color: #ffffff !important;
  text-decoration: none !important;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-base, 6px);
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background-color 0.15s ease, transform 0.1s ease;
  cursor: pointer;
}

.btn-berlin-primary:hover,
.btn-berlin-primary:focus {
  background-color: var(--berlin-red-hover, #b80017);
  outline: none;
}

.btn-berlin-primary:active {
  transform: translateY(1px);
  box-shadow: none;
}

/* Download-Button Container zentriert */
.download-container {
  margin: 2.5rem 0;        
  display: flex;           
  justify-content: center; 
  width: 100%;
}

/* Das erweiterte Design für den Download-Button */
.btn-berlin-download {
  display: inline-flex;
  align-items: center;
  background-color: var(--berlin-red, #e40422);
  color: #ffffff !important;
  text-decoration: none !important;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-base, 6px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  transition: background-color 0.15s ease, transform 0.1s ease;
  gap: 15px; 
}

.btn-berlin-download .btn-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.btn-berlin-download strong {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}

.btn-berlin-download .file-info {
  font-size: 0.8rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 2px;
}

.btn-berlin-download .download-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

.btn-berlin-download:hover,
.btn-berlin-download:focus {
  background-color: var(--berlin-red-hover, #b80017);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  outline: none;
}

/* 9. BARRIEREFREIE TABELLEN-FORMATIERUNG
   -------------------------------------------------------------------------- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--berlin-border-gray, #e0e0e0);
  border-radius: 4px;
}

.berlin-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  text-align: left;
  background-color: #ffffff;
}

.berlin-data-table thead th {
  background-color: var(--berlin-dark-gray, #333333);
  color: #ffffff;
  padding: 12px 16px;
  font-weight: 700;
  border-bottom: 3px solid var(--berlin-red, #e40422);
}

.berlin-data-table td {padding: 14px 16px;border-bottom: 1px solid var(--berlin-border-gray, #e0e0e0);vertical-align: middle;line-height: 1.5;}

.berlin-data-table tbody tr:nth-child(even) {background-color: #f9f9f9;}

.berlin-data-table tbody tr.row-highlight-danger {background-color: #fff5f5;}

/* Status-Badges im Tabellensystem */.status-badge {display: inline-block;padding: 6px 12px;font-size: 0.85rem;font-weight: 700;border-radius: 4px;text-align: center;white-space: nowrap;}

.status-badge.status-success {background-color: #007a33;color: #ffffff;}

.status-badge.status-danger {background-color: #c8102e;color: #ffffff;}

.text-muted {color: #767676;}


/* 11. FORMATIERUNG FÜR RECHTLICHE TEXTE & ERKLÄRUNGEN
   -------------------------------------------------------------------------- */
.content-block {
  margin-bottom: 2.5rem;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--berlin-dark-gray);
  margin-bottom: 2rem;
  font-style: italic;
}

/* Inline-Links im Textbereich */
.berlin-inline-link {
  color: #1155cc;
  text-decoration: underline;
}

.berlin-inline-link:hover {
  color: var(--berlin-red);
}

/* Gelbliche Warn-Box für den Teilweise-Barrierefrei-Status */
.status-box.status-warning-box {
  background-color: #fffdf0;
  border-left: 4px solid #ffcc00;
  padding: 1.25rem 1.5rem;
  margin-top: 1.5rem;
  border-radius: 0 var(--radius-base) var(--radius-base) 0;
}

.status-box h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #665200;
}

/* Kontaktboxen */
.info-card-contact {
  background-color: var(--berlin-white);
  border: 1px solid var(--berlin-border-gray);
  border-radius: var(--radius-base);
  padding: 1.5rem;
  margin-top: 1rem;
  box-shadow: var(--shadow-card);
}

.info-card-contact h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--berlin-light-gray);
  padding-bottom: 0.5rem;
}

.info-card-contact p {
  margin-bottom: 0.5rem;
}
