:root{
  --gap: 12px;
  --radius: 8px;
  --bg: #f7f7f8;
  --card-bg: #ffffff;
  --muted: #666;
  --accent: #0a84ff;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial;
  background:var(--bg);
  color:white;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  padding:20px;
}

/* Visually hidden (screen-reader only) */
.sr-only{
  position:absolute!important;
  width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;
}

.container{
  max-width:800px;  /* Breite des unteren Containers mit den Blöcken - Vorgabe war  1200 */
  margin:0 auto;
}

/* Grid: responsive using auto-fit */
.grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap:var(--gap);
  align-items:start;
}

/* Each item is a clickable "card" */
.item{
  display:block;
  background:var(--card-bg);
  border-radius:var(--radius);
  overflow:hidden;
  text-decoration:none;
  color:inherit;
  box-shadow:0 1px 2px rgba(0,0,0,0.05);
  transition:transform .12s ease, box-shadow .12s ease;
  position:relative;
  padding:8px; /* Innerer Weißer Rand bis zum Bild */
  text-align:center;
}

/* Maintain a square thumbnail using aspect-ratio */
.item img{
  width:100%;
  height:auto;
  display:block;
  border-radius:8px;
  object-fit:cover;
  aspect-ratio: 1/1;
}

/* Label under the image */
.label{
  display:block;
  margin-top:15px; /* Abstand der Böcke zueinander */
  font-size:1rem;
  color: var(--accent); /* oder z.B. #0a84ff */
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Hover / focus states for keyboard accessibility */
.item:hover,
.item:focus{
  transform:translateY(-6px);
  box-shadow:0 8px 18px rgba(10,132,255,0.12);
  outline: none;
}

.item:focus-visible{
  box-shadow:0 0 0 3px rgba(10,132,255,0.14);
}

/* Make the whole card keyboard-clickable and give clear active state */
.item:active{transform:translateY(-2px) scale(.998);}

/* Small screens: slightly larger items vertically */
@media (max-width:420px){
  .grid{ gap:10px; }
  .label{font-size:0.85rem}
}

/* Larger screens: increase minimum column size */
@media (min-width:900px){
  .grid{ grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .label{font-size:0.95rem}
}

/* Topbar */
.topbar{
  background: #0a4f86; /* Beispiel dunkles Blau */
  border-bottom-color: #0a4f86; /*rgba(255,255,255,0.06);*/
  /*
  background:#2E2E2E;
  border-bottom:1px solid #e6e6e9;*/
  position:sticky;
  top:0;
  z-index:30;
  backdrop-filter: blur(6px);
  
}

.topbar-inner{
  max-width:1200px;
  margin:0 auto;
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 20px;
}

/* Brand */
.brand{
  font-weight:600;
  color:white;
  text-decoration:none;
  margin-right:6px;
  flex:0 0 auto;
}

/* Horizontal nav: scrollable on small screens */
.topnav{
  display:flex;
  gap:8px;
  overflow:auto;
  padding:6px 2px;
  scrollbar-width:thin;
  -webkit-overflow-scrolling:touch;
  flex:1 1 auto;
  color:#fff;
}

.nav-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:8px;
  text-decoration:none;
  color:#fff;
  font-size:1.1rem;  /*  Schriftgröße in der oberen Linkleiste */
  white-space:nowrap;
  transition:background .12s, color .12s, transform .08s;
}

.nav-link:hover,
.nav-link:focus{
  background:linear-gradient(90deg, rgba(10,132,255,0.1), rgba(10,132,255,0.02));
  color:var(--accent);
  transform:translateY(-2px);
  outline:none;
}

.nav-link:active{ transform:translateY(0); }

.topnav::-webkit-scrollbar{ height:8px; }
.topnav::-webkit-scrollbar-thumb{ background:rgba(0,0,0,0.08); border-radius:6px; }

/* Layout tweak: ensure main content sits below sticky header */
body{ padding-top:0; } /* header is sticky so no extra padding needed unless overlapping occurs */

/* Responsive: hide labels and show icons only (example) */
@media (max-width:480px){
  .brand{ font-size:0.95rem; }
  .nav-link{ padding:8px; font-size:0.9rem; }
}

