:root {
  --bg: #eef2f7;
  --bg-2: #f7fafc;
  --surface: #ffffff;
  --surface-hover: #ffffff;
  --border: #e3e9f0;
  --border-strong: #d4dde7;
  --text: #1f2d3d;
  --muted: #647387;
  --accent: #1d6fb8;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 35, 60, 0.04), 0 6px 18px -10px rgba(16, 35, 60, 0.18);
  --shadow-hover: 0 2px 4px rgba(16, 35, 60, 0.06), 0 16px 34px -14px rgba(16, 35, 60, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-2), var(--bg) 240px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.bg-glow {
  position: fixed;
  inset: 0 0 auto 0;
  height: 320px;
  pointer-events: none;
  background: radial-gradient(
      900px 240px at 50% -120px,
      rgba(29, 111, 184, 0.1),
      transparent
    );
  z-index: 0;
}

.masthead,
main {
  position: relative;
  z-index: 1;
  width: min(1120px, 92vw);
  margin-inline: auto;
}

/* Header */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.3rem 0 1rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.4rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: #d23b53;
  background: #fdecef;
  border: 1px solid #f6d5dc;
}

.brand-mark svg {
  width: 32px;
  height: auto;
}

.brand-text h1 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #16202c;
}

.brand-text p {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.clock-wrap {
  text-align: right;
}

.clock {
  font-size: 1.45rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  color: #16202c;
}

.greeting {
  color: var(--muted);
  font-size: 0.82rem;
}

/* Search */
main {
  flex: 1;
  padding-bottom: 2rem;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 0.7rem 1.05rem;
  margin: 0 0 1.8rem;
  box-shadow: var(--shadow);
}

.search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 111, 184, 0.12);
}

.search-icon {
  width: 20px;
  height: 20px;
  color: var(--muted);
  flex: none;
}

#filter {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  outline: none;
}

#filter::placeholder {
  color: var(--muted);
}

/* Sections */
.tool-section {
  margin-bottom: 2rem;
}

.section-title {
  margin: 0 0 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* Collapsible section (Elektrophysiologie) */
.section-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  margin: 0 0 0.9rem;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  color: inherit;
}

.section-toggle .section-title {
  margin: 0;
}

.section-chevron {
  width: 16px;
  height: 16px;
  color: var(--muted);
  transition: transform 0.18s ease;
}

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

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1rem;
}

/* hidden attribute must win over display:grid (collapsible section) */
.grid[hidden] {
  display: none;
}

.card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 11px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, #ffffff);
}

.card-icon svg {
  width: 23px;
  height: 23px;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.card-title {
  font-weight: 600;
  font-size: 1.02rem;
  color: #1a2533;
}

.card-desc {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-arrow {
  margin-left: auto;
  color: var(--border-strong);
  transform: translateX(-3px);
  transition: opacity 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.card:hover .card-arrow {
  transform: translateX(0);
  color: var(--accent);
}

.empty {
  text-align: center;
  color: var(--muted);
  margin-top: 2rem;
}

/* Header extras (sub-pages) */
.brand-link {
  display: inline-flex;
  color: inherit;
  text-decoration: none;
}

.back-link {
  text-decoration: none;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.back-link:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, #ffffff);
}

/* Content / tables (sub-pages) */
.content {
  margin-bottom: 2rem;
}

.section-meta {
  margin: -0.4rem 0 0.9rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.info-table th,
.info-table td {
  text-align: left;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.info-table thead th {
  position: sticky;
  top: 0;
  background: #f3f7fb;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.info-table tbody tr:last-child td {
  border-bottom: 0;
}

.info-table tbody tr:hover {
  background: #f7fafd;
}

.info-table td:first-child {
  font-weight: 600;
  color: #1a2533;
  white-space: nowrap;
}

.info-table .row-highlight {
  background: color-mix(in srgb, var(--accent) 7%, #ffffff);
}

.info-table .row-highlight:hover {
  background: color-mix(in srgb, var(--accent) 11%, #ffffff);
}

.info-table .row-group td {
  background: #f3f7fb;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.info-table .row-group:hover td {
  background: #f3f7fb;
}

/* Footer – nimmt die volle Desktop-Breite ein */
.site-footer {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  padding: 1.8rem clamp(1rem, 4vw, 3rem) 2.4rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-phones-wrap {
  width: 100%;
  text-align: center;
}

.footer-phones-title {
  margin: 0 0 0.8rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.footer-phones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.phone {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.phone-label {
  color: var(--muted);
  font-size: 0.8rem;
}

.phone-num {
  color: #16202c;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.footer-credit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.site-footer .dot {
  opacity: 0.5;
}

@media (max-width: 520px) {
  .masthead {
    padding-top: 1.8rem;
  }
  .clock {
    font-size: 1.55rem;
  }
}
