/* ==========================================================================
   AGB (Allgemeine Geschäftsbedingungen) – Global Styles
   A1-ESD Equipment GmbH
   ========================================================================== */

/* --- Layout & Typography --- */
.agb-wrap {
  max-width: 860px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: #1a1a2e;
  line-height: 1.75;
  font-size: 15px;
}

.agb-wrap * {
  box-sizing: border-box;
}

/* --- Header --- */
.agb-header {
  margin-bottom: 32px;
}

.agb-header h1 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: #0d1b2e;
  text-transform: none;
  padding-left: 1rem;
  margin: 0 0 8px;
  border-left: 4px solid #0066cc;
}

.agb-header .agb-subtitle {
  color: #6b7280;
  margin: 0;
}

/* --- Meta bar --- */
.agb-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  margin: 16px 0 24px;
  font-size: 13px;
  color: #6b7280;
}

.agb-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.agb-meta .agb-pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #003366;
  color: #fff;
  padding: 5px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
}

.agb-meta .agb-pdf-btn:hover {
  background: #004d99;
}

/* --- Icons --- */
.agb-ico {
  display: inline-block;
  width: 16px;
  height: 16px;
  vertical-align: -2px;
  flex-shrink: 0;
}

.agb-ico--white {
  stroke: #fff;
}

.agb-ico--gray {
  stroke: #6b7280;
}

/* --- Table of Contents --- */
.agb-toc {
  background: #f7f8fa;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 32px;
}

.agb-toc h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #6b7280;
  margin: 0 0 12px;
  font-weight: 600;
}

.agb-toc ol {
  list-style: none;
  counter-reset: toc;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 32px;
}

.agb-toc li {
  counter-increment: toc;
  padding: 5px 0;
  font-size: 14px;
  border-bottom: 1px solid #f0f1f3;
}

.agb-toc li::before {
  content: counter(toc, decimal-leading-zero) ".";
  color: #003366;
  font-weight: 700;
  margin-right: 7px;
}

.agb-toc a {
  color: #374151;
  text-decoration: none;
}

.agb-toc a:hover {
  color: #003366;
  text-decoration: underline;
}

/* --- Sections (Accordion) --- */
.agb-section {
  border-bottom: 1px solid #eee;
  margin-bottom: 4px;
}

.agb-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 12px;
  margin: 0 -12px;
  cursor: pointer;
  user-select: none;
  background: none;
  border: none;
  width: calc(100% + 24px);
  text-align: left;
  font-family: inherit;
  border-radius: 6px;
  transition: background 0.15s;
  outline: none;
}

.agb-section-header:hover {
  background: #f4f5f7;
}

.agb-section-header:focus {
  outline: none;
  background: none;
}

.agb-section-header:focus-visible {
  outline: 2px solid #003366;
  outline-offset: -2px;
}

/* --- Section: open state --- */
.agb-section.open > .agb-section-header {
  background: #003366;
  color: #fff;
}

.agb-section.open > .agb-section-header .agb-section-title {
  color: #fff;
}

.agb-section.open > .agb-section-header .agb-chevron {
  color: rgba(255, 255, 255, 0.6);
}

.agb-section.open > .agb-section-header .agb-section-num {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.agb-section.open > .agb-section-header:hover {
  background: #004080;
}

/* --- Section number badge --- */
.agb-section-num {
  background: #003366;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

/* --- Section title --- */
.agb-section-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
  flex: 1;
}

/* --- Chevron --- */
.agb-chevron {
  font-size: 12px;
  color: #9ca3af;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.agb-section.open .agb-chevron {
  transform: rotate(180deg);
}

/* --- Section body --- */
.agb-section-body {
  display: none;
  padding: 0 0 20px 40px;
  color: #4b5563;
  font-size: 14.5px;
  line-height: 1.8;
}

.agb-section.open .agb-section-body {
  display: block;
}

.agb-section-body p {
  margin: 0 0 10px;
}

.agb-section-body ul {
  margin: 8px 0;
  padding-left: 20px;
}

.agb-section-body li {
  margin-bottom: 4px;
}

/* --- Links inside sections --- */
.agb-section-body a {
  color: #003366;
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .agb-toc ol {
    columns: 1;
  }

  .agb-meta {
    flex-direction: column;
    gap: 8px;
  }

  .agb-section-body {
    padding-left: 0;
  }
}

/* --- Print --- */
@media print {
  .agb-section-body {
    display: block !important;
  }

  .agb-chevron {
    display: none;
  }

  .agb-meta .agb-pdf-btn {
    display: none;
  }
}
