/* ===== IGS Lüneburg – Kollegium ===== */
:root{
  --c-red:#e2231a; --c-orange:#f57a00; --c-magenta:#d81b8c;
  --c-green:#2e9e33; --c-blue:#1ca0e0;
  --bg:#f4f6f9; --surface:#ffffff; --surface-2:#eef1f6;
  --ink:#1d2733; --muted:#5d6b7a; --heading:#10243b;
  --line:#e2e7ee; --shadow:0 6px 24px rgba(16,36,59,.08);
  --shadow-lg:0 16px 48px rgba(16,36,59,.16);
  --radius:16px; --accent:var(--c-blue);
  --sidebar-w:248px;
  --font:"Segoe UI",-apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;
}
[data-theme="dark"]{
  --bg:#0e151f; --surface:#172230; --surface-2:#1f2d3d;
  --ink:#e6edf5; --muted:#9fb0c2; --heading:#f1f6fb;
  --line:#28384a; --shadow:0 6px 24px rgba(0,0,0,.4);
  --shadow-lg:0 16px 48px rgba(0,0,0,.55);
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:var(--font);background:var(--bg);color:var(--ink);line-height:1.5;-webkit-font-smoothing:antialiased}
img{max-width:100%;display:block}
a{color:inherit}
button{font-family:inherit;cursor:pointer;border:none;background:none;color:inherit}

/* ===== Header ===== */
.site-header{position:sticky;top:0;z-index:60;background:var(--surface);border-bottom:1px solid var(--line);box-shadow:var(--shadow)}
.rainbow-bar{height:5px;background:linear-gradient(90deg,var(--c-red) 0 20%,var(--c-orange) 20% 40%,var(--c-magenta) 40% 60%,var(--c-green) 60% 80%,var(--c-blue) 80% 100%)}
.header-inner{max-width:1480px;margin:0 auto;padding:.7rem 1.2rem;display:flex;align-items:center;gap:1rem}
.menu-btn{display:none;width:42px;height:42px;border-radius:12px;background:var(--surface-2);place-items:center;border:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:.7rem;text-decoration:none;flex-shrink:0}
.brand img{height:48px;width:auto}
.brand .t1{font-weight:800;font-size:1.05rem;color:var(--heading);line-height:1.1}
.brand .t2{font-size:.78rem;color:var(--muted);font-weight:600}
.header-tools{display:flex;align-items:center;gap:.6rem;flex-shrink:0}

/* Shape switch entfernt — Variante 2 (rund) wurde herausgenommen.
   Es bleibt nur die "eckige" Variante 1 als einziges Design. */


.theme-toggle{width:42px;height:42px;border-radius:12px;background:var(--surface-2);display:grid;place-items:center;transition:.2s;border:1px solid var(--line)}
.theme-toggle:hover{background:var(--accent);color:#fff}
.theme-toggle svg{width:20px;height:20px}
.theme-toggle .sun{display:none}
[data-theme="dark"] .theme-toggle .sun{display:block}
[data-theme="dark"] .theme-toggle .moon{display:none}

/* ===== Layout ===== */
.layout{max-width:1480px;margin:0 auto;display:flex;align-items:flex-start}

/* ===== Sidebar ===== */
.sidebar{width:var(--sidebar-w);flex-shrink:0;position:sticky;top:calc(5px + 64px);align-self:flex-start;height:calc(100vh - 69px);overflow-y:auto;border-right:1px solid var(--line);background:var(--surface)}
.sidebar-scroll{padding:1.1rem .8rem 2rem}
.nav-group{margin-top:1.2rem}
.nav-head{font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);padding:0 .7rem .5rem}
.nav-item{display:flex;align-items:center;gap:.6rem;width:100%;text-align:left;padding:.6rem .7rem;border-radius:10px;font-size:.9rem;font-weight:600;color:var(--ink);transition:.15s;margin-bottom:2px}
.nav-item:hover{background:var(--surface-2)}
.nav-item.active{background:var(--accent);color:#fff}
.nav-item.active .nav-n{background:rgba(255,255,255,.25);color:#fff}
.nav-item.active .nav-dot{box-shadow:0 0 0 2px rgba(255,255,255,.6)}
.nav-all{font-weight:700}
.nav-n{margin-left:auto;font-size:.76rem;font-weight:700;background:var(--surface-2);color:var(--muted);padding:.1rem .5rem;border-radius:999px;min-width:26px;text-align:center}
.nav-dot{width:10px;height:10px;border-radius:3px;background:var(--c-blue);flex-shrink:0}
.nav-dot.jg{border-radius:50%;background:linear-gradient(135deg,var(--c-magenta),var(--c-orange))}
.nav-dot[data-cat="Schulleitung"]{background:var(--c-red)}
.nav-dot[data-cat="Lehrkräfte"]{background:var(--c-blue)}
.nav-dot[data-cat="Förderschullehrkräfte"]{background:var(--c-green)}
.nav-dot[data-cat="Schulsozialarbeit"]{background:var(--c-magenta)}
.nav-dot[data-cat="Sekretariat"]{background:var(--c-orange)}
.nav-dot[data-cat="Schul-IT"]{background:var(--c-blue)}
.nav-dot[data-cat="Schulassistenz"]{background:var(--c-green)}
.nav-dot[data-cat="Hausmeister"]{background:var(--c-orange)}
.nav-dot[data-cat="Mensa"]{background:var(--c-magenta)}
.nav-dot[data-cat="Berufsorientierung"]{background:var(--c-red)}
.nav-dot[data-cat="Weitere Mitarbeitende"]{background:var(--muted)}
.sidebar-backdrop{display:none;position:fixed;inset:0;background:rgba(8,16,28,.5);z-index:55}

/* ===== Content ===== */
.content{flex:1;min-width:0;padding:0 1.2rem}
.hero{padding:1.6rem .2rem .4rem}
.hero h1{font-size:clamp(1.5rem,4vw,2.1rem);color:var(--heading);font-weight:800;letter-spacing:-.02em}
.hero h1 .accent{background:linear-gradient(90deg,var(--c-magenta),var(--c-orange));-webkit-background-clip:text;background-clip:text;color:transparent}
.hero p{color:var(--muted);margin-top:.4rem;max-width:62ch}
.search-wrap{margin-top:1.1rem;position:relative;max-width:560px}
.search-wrap>svg{position:absolute;left:16px;top:50%;transform:translateY(-50%);width:20px;height:20px;color:var(--muted);pointer-events:none}
#search{width:100%;padding:.95rem 2.8rem .95rem 3rem;font-size:1.02rem;border:2px solid var(--line);border-radius:14px;background:var(--surface);color:var(--ink);transition:.2s}
#search:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 4px rgba(28,160,224,.15)}
.search-clear{position:absolute;right:10px;top:50%;transform:translateY(-50%);width:30px;height:30px;border-radius:8px;display:none;place-items:center;color:var(--muted)}
.search-clear:hover{background:var(--surface-2);color:var(--ink)}
.search-clear.show{display:grid}
.filter-sub{margin-top:.9rem;display:flex;gap:.6rem;align-items:center;flex-wrap:wrap}
.subject-select{padding:.55rem .9rem;border-radius:10px;border:1.5px solid var(--line);background:var(--surface);color:var(--ink);font-size:.9rem;font-weight:600;cursor:pointer;min-width:180px}
.subject-select:focus{outline:none;border-color:var(--accent)}
.result-count{font-size:.88rem;color:var(--muted);font-weight:600;margin-left:auto}
.result-count b{color:var(--heading)}

/* ===== Grid ===== */
.grid{padding:1.2rem .2rem 2rem;display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:1.1rem}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);transition:transform .2s,box-shadow .2s;cursor:pointer;position:relative;display:flex;flex-direction:column}
.card::before{content:"";position:absolute;top:0;left:0;right:0;height:4px;background:var(--ca,var(--accent));z-index:2}
.card:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg)}
.card-photo{aspect-ratio:1/1;background:var(--surface-2);position:relative;overflow:hidden}
.card-photo img{width:100%;height:100%;object-fit:cover}
.avatar-sil{width:100%;height:100%;display:grid;place-items:center;background:var(--ca,var(--accent));position:relative}
.avatar-sil img{width:78%;height:78%;object-fit:contain;margin-top:8%;filter:drop-shadow(0 2px 6px rgba(0,0,0,.15))}
.avatar-sil .ini{position:absolute;bottom:6px;right:8px;font-size:.7rem;font-weight:800;color:rgba(255,255,255,.9);letter-spacing:.04em}
.card-body{padding:.85rem .9rem 1rem;display:flex;flex-direction:column;gap:.3rem;flex:1}
.card-name{font-weight:700;color:var(--heading);font-size:1rem;line-height:1.2}
.kuerzel{font-weight:600;color:var(--muted);font-size:.85em}
.card-role{font-size:.82rem;color:var(--muted);line-height:1.3}
.card-meta{margin-top:auto;display:flex;align-items:center;gap:.4rem;flex-wrap:wrap;padding-top:.45rem}
.tag-cat{font-size:.68rem;font-weight:700;text-transform:uppercase;letter-spacing:.03em;color:var(--ca,var(--accent))}
.tag-jg{font-size:.66rem;font-weight:700;background:var(--surface-2);color:var(--muted);padding:.12rem .45rem;border-radius:999px}

/* (Runde Variante entfernt) */


.empty{grid-column:1/-1;text-align:center;padding:3rem 1rem;color:var(--muted)}
.empty svg{width:48px;height:48px;opacity:.4;margin-bottom:.8rem}

/* ===== Modal ===== */
.modal-overlay{position:fixed;inset:0;background:rgba(8,16,28,.6);backdrop-filter:blur(4px);z-index:100;display:none;place-items:center;padding:1.2rem}
.modal-overlay.open{display:grid}
.modal{background:var(--surface);border-radius:20px;max-width:440px;width:100%;overflow:hidden;box-shadow:var(--shadow-lg);position:relative;animation:pop .25s ease}
@keyframes pop{from{transform:scale(.94);opacity:0}to{transform:scale(1);opacity:1}}
.modal-close{position:absolute;top:12px;right:12px;width:38px;height:38px;border-radius:10px;background:rgba(0,0,0,.35);color:#fff;display:grid;place-items:center;z-index:3}
.modal-close:hover{background:rgba(0,0,0,.6)}
.modal-photo{aspect-ratio:1/1;max-height:340px;background:var(--surface-2);position:relative}
.modal-photo img{width:100%;height:100%;object-fit:cover}
.modal-photo .avatar-sil img{width:60%;height:60%}
.modal-body{padding:1.3rem 1.4rem 1.6rem}
.modal-tags{display:flex;gap:.5rem;flex-wrap:wrap;margin-bottom:.6rem}
.modal-cat-tag{display:inline-block;font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:#fff;background:var(--ca,var(--accent));padding:.25rem .7rem;border-radius:999px}
.modal-jg-tag{display:inline-block;font-size:.72rem;font-weight:700;color:var(--ink);background:var(--surface-2);border:1px solid var(--line);padding:.25rem .7rem;border-radius:999px}
.modal-body h2{color:var(--heading);font-size:1.4rem;margin-bottom:.3rem}
.modal-body .role{color:var(--muted);font-size:.95rem;margin-bottom:1rem}
.subj-tags{display:flex;flex-wrap:wrap;gap:.45rem}
.subj-tags .st{font-size:.82rem;font-weight:600;background:var(--surface-2);color:var(--ink);padding:.4rem .8rem;border-radius:8px;border:1px solid var(--line)}
.subj-label{font-size:.78rem;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.04em;margin-bottom:.5rem}

/* ===== Footer ===== */
.site-footer{background:var(--surface);border-top:1px solid var(--line);margin-top:1rem}
.footer-inner{max-width:1480px;margin:0 auto;padding:1.6rem 1.2rem;display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap}
.footer-inner .info{font-size:.85rem;color:var(--muted)}
.powered-by{display:inline-flex;align-items:center;gap:.5rem;text-decoration:none;color:var(--muted);font-size:.82rem;font-weight:600;transition:.2s}
.powered-by:hover{color:var(--ink)}
.powered-by img{height:22px;width:auto}

/* ===== Tablet/Mobile ===== */
@media (max-width:1024px){
  .menu-btn{display:grid}
  .sidebar{position:fixed;top:0;left:0;height:100vh;z-index:70;transform:translateX(-100%);transition:transform .25s ease;box-shadow:var(--shadow-lg);padding-top:.5rem}
  .sidebar.open{transform:translateX(0)}
  .sidebar-backdrop.open{display:block}
  .content{padding:0 .9rem}
}
@media (max-width:768px){
  .grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:.8rem}
  .result-count{width:100%;margin-left:0}
  .brand .t2{display:none}
  .header-inner{padding:.6rem .9rem;gap:.5rem}
  .footer-inner{flex-direction:column;text-align:center}
}
@media (max-width:480px){
}
@media (max-width:420px){
  .grid{grid-template-columns:repeat(2,1fr);gap:.7rem}
  .card-name{font-size:.92rem}
  .card-role{font-size:.76rem}
}
@media (prefers-reduced-motion:reduce){
  *{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}

.modal-email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: var(--bg-body-alt, #f0f4f8);
  border-radius: 0.375rem;
  color: var(--accent, #1ca0e0);
  font-size: 0.8125rem;
  text-decoration: none;
  font-weight: 500;
}
.modal-email:hover {
  opacity: 0.85;
}
.modal-email svg {
  flex-shrink: 0;
}

/* ===== Kontakt-Icons oben rechts auf Karten ===== */
.card-photo{position:relative}
.contact-icons{
  position:absolute;
  top:8px;
  right:8px;
  display:flex;
  gap:4px;
  z-index:3;
  pointer-events:auto;
}
.contact-icons .ci{
  position:relative;
  width:24px;
  height:24px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:rgba(255,255,255,.92);
  box-shadow:0 1px 3px rgba(0,0,0,.18);
  backdrop-filter:saturate(140%) blur(2px);
  transition:transform .15s, background .15s;
}
.contact-icons .ci:hover{transform:scale(1.12)}
.contact-icons .ci-on{color:#1ca0e0}
.contact-icons .ci-off{color:#9aa4ad}
.contact-icons .ci-off svg:first-child{opacity:.55}
.contact-icons .icon-slash{
  position:absolute;
  inset:0;
  margin:auto;
  color:#c33;
  pointer-events:none;
}
[data-theme="dark"] .contact-icons .ci{background:rgba(28,32,38,.92)}
[data-theme="dark"] .contact-icons .ci-off{color:#7a8390}
