:root{
  /* ZHAW */
  --zhaw-blue: #0064A6;

  /* Neutrals */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f2f2f2;

  --text: #0b1b2b;
  --muted: rgba(11,27,43,0.72);
  --muted-2: rgba(11,27,43,0.56);

  --border: rgba(0,0,0,0.18);
  --border-soft: rgba(0,0,0,0.12);

  --ring: 0 0 0 3px rgba(0,100,166,0.25);

  --font-body: Helvetica, Arial, sans-serif;
  --font-display: Helvetica, Arial, sans-serif;
}
  /* Scroll to Topx */
.to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;

  display: none;                 /* wird per JS eingeblendet */
  align-items: center;
  justify-content: center;

  width: 40px;
  height: 40px;

  color: #1a1a1a;                /* Text-/Iconfarbe */
  background-color: #f2f2f2;     /* ruhiges Hellgrau */
  border: 1px solid #d9d9d9;     /* dezente Abgrenzung */

  border-radius: 50%;
  cursor: pointer;

  z-index: 1000;
}

/* Hover / Focus: minimaler Kontrastwechsel */
.to-top:hover,
.to-top:focus {
  background-color: #e6e6e6;
  outline: none;
}

/* ---------------------------------
   RESPONSIVE (Mobile)
   kleiner, damit nicht dominiert
---------------------------------- */
@media (max-width: 768px) {
  .to-top {
    width: 32px;
    height: 32px;
    bottom: 1rem;
    right: 1rem;
  }

  .to-top svg {
    width: 14px;
    height: 14px;
  }
}

.to-top:hover,
.to-top:focus {
  background-color: #e6e6e6;
  outline: none;
}

*{ box-sizing: border-box; }
html, body { height: 100%; }

html{
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body{
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

a{ color: inherit; }

.container{
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.skip-link{
  position: absolute;
  left: -999px;
  top: 12px;
  background: #fff;
  color: #000;
  padding: 10px 12px;
  border: 1px solid var(--border);
}
.skip-link:focus{ left: 12px; z-index: 9999; }

/* =======================
   HEADER (ZHAW-like)
   ======================= */

.site-header{
  position: static;
  z-index: 50;
  background: #fff;
  border-bottom: 0;
  box-shadow: none;
}

.header-grid{
  display: grid;
  grid-template-columns: 1.1fr 1.6fr;
  gap: 18px;
  padding: 18px 16px;
  align-items: center;
  background: var(--zhaw-blue);
}

@media (max-width: 980px){
  .site-header .container{ width: 100%; }
  .header-grid{
    grid-template-columns: 1fr;
    align-items: start;
    padding: 14px 16px;
  }
}

.brand{
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 0;
}

.brand-mark{
  width: 56px;
  height: 56px;
  background: transparent;
  border: none;
  overflow: visible; /* Logo nicht abschneiden */
  display: grid;
  place-items: center;
}

.brand-logo{
  width: 56px;
  height: auto;
  display: block;
  object-fit: contain;
}

.brand-kicker{
  margin: 0;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
}

.brand-title{
  margin: 2px 0 4px;
  color: #fff;
  font-size: 28px;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: 0;
}

.brand-subtitle{
  margin: 0;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  font-weight: 400;
}

/* Header actions (Filterbox) */
.header-actions{
  background: #fff;
  border: 1px solid rgba(0,0,0,0.20);
  border-radius: 0;
  box-shadow: none;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.controls{
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 1fr 0.8fr;
  gap: 10px;
}
@media (max-width: 980px){
  .controls{ grid-template-columns: 1fr; }
}

.control{ display: grid; gap: 6px; }

.control-label{
  font-size: 12px;
  color: rgba(11,27,43,0.60);
}

.input, .select{
  width: 100%;
  padding: 11px 12px;
  border-radius: 0;
  border: 1px solid rgba(0,0,0,0.25);
  background: #fff;
  color: var(--text);
  outline: none;
  box-shadow: none;
}

.input:focus, .select:focus{
  border-color: var(--zhaw-blue);
  box-shadow: none;
  outline: none;
}

.meta{
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}
@media (max-width: 980px){
  .meta{ justify-content: flex-start; }
}

.pill{
  padding: 8px 10px;
  border-radius: 0;
  background: var(--surface-2);
  border: 1px solid rgba(0,0,0,0.20);
  color: #000;
  font-size: 13px;
  font-weight: 600;
}

.btn{
  cursor: pointer;
  border-radius: 0;
  border: 1px solid rgba(0,0,0,0.20);
  padding: 11px 12px;
  background: #fff;
  color: #000;
  font-weight: 600;
  box-shadow: none;
  transition: background .12s ease, border-color .12s ease;
}

.btn:hover{
  border-color: rgba(0,0,0,0.35);
}

.btn-secondary{
  background: var(--zhaw-blue);
  border-color: var(--zhaw-blue);
  color: #fff;
}

.btn-secondary:hover{
  background: #004f87;
}

.btn-ghost{
  background: transparent;
}

/* =======================
   MAIN / SECTION
   ======================= */

.section{
  padding: 18px 0 40px;
  background: transparent;
}

.section-head{ margin-bottom: 12px; }

.section-title{
  margin: 0 0 6px;
  font-size: 18px;
  color: #000;
  font-family: var(--font-display);
  font-weight: 700;
}

.section-hint{
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* =======================
   ACCORDION (eckig)
   ======================= */

.accordion{
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.acc-item{
  border: 1px solid rgba(0,0,0,0.20);
  border-radius: 0;
  overflow: hidden;
  background: #fff;
}

.acc-button{
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 0;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.acc-button:hover{ background: rgba(0,100,166,0.06); }
.acc-button:focus{ outline: none; box-shadow: var(--ring); }

.acc-title{
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}

.acc-title strong{
  font-size: 15px;
  color: #000;
  font-family: var(--font-display);
  font-weight: 700;
}

.acc-count{
  color: var(--muted-2);
  font-size: 13px;
  border: 1px solid rgba(0,0,0,0.20);
  padding: 4px 8px;
  border-radius: 0;
  background: var(--surface-2);
}

.chev{
  width: 38px;
  height: 38px;
  border-radius: 0;
  border: 1px solid rgba(0,0,0,0.20);
  background: #fff;
  display: grid;
  place-items: center;
  transition: transform .18s ease;
  color: #000;
}

.acc-item[data-open="true"] .chev{ transform: rotate(180deg); }

.acc-panel{
  display: none;
  padding: 0 16px 16px;
}

.acc-item[data-open="true"] .acc-panel{ display: block; }

/* =======================
   CARDS (eckig)
   ======================= */

.cards{
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 1100px){
  .cards{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 680px){
  .cards{ grid-template-columns: 1fr; }
}

.card{
  border: 1px solid rgba(0,0,0,0.20);
  border-radius: 0;
  background: #fff;
  overflow: hidden;
  display: grid;
}

.card-head{
  padding: 16px;
  display: grid;
  grid-template-columns: 76px 1fr auto;
  gap: 14px;
  align-items: start;
  border-bottom: 1px solid rgba(0,0,0,0.12);
  background: #fff;
}

/* ✅ Logos ohne Rahmen/Box */
.logo{
  width: 76px;
  height: 76px;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.logo img{
  max-width: 100%;
  max-height: 48px;
  width: auto;
  height: auto;
  object-fit: contain;
  padding: 0;
  background: transparent;
}

.card-title{
  display: grid;
  gap: 3px;
  min-width: 0;
}

.card-title h3{
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
  color: #000;
  font-family: var(--font-display);
  font-weight: 700;
}

.card-title p{
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* Link "Zur Webseite" */
.company-link{
  margin-top: 6px;
  font-size: 13px;
}

.company-link a{
  color: var(--zhaw-blue);
  text-decoration: underline;
}
.company-link a:hover{
  color: #004f87;
}

.status-stack{
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.badge{
  padding: 8px 12px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  border: 1px solid rgba(0,0,0,0.20);
  background: var(--surface-2);
  white-space: nowrap;
}

.badge.open{
  border-color: rgba(17,138,59,0.35);
  color: #0f6b2d;
  background: rgba(17,138,59,0.10);
}

.badge.closed{
  border-color: rgba(200,30,30,0.35);
  color: #8d1b1b;
  background: rgba(200,30,30,0.08);
}

.fav-btn{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 0;
  border: 1px solid rgba(0,0,0,0.20);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.fav-btn:hover{
  border-color: rgba(0,0,0,0.35);
  color: #000;
}

.fav-btn:focus{ outline: none; box-shadow: var(--ring); }
.fav-btn .fav-icon{ width: 16px; height: 16px; }

.fav-btn.active{
  border-color: rgba(0,100,166,0.40);
  color: #000;
  background: rgba(0,100,166,0.08);
}

.fav-btn.active .fav-icon path{
  stroke: #000;
  fill: rgba(0,100,166,0.22);
}

.card-body{
  padding: 12px 16px 16px;
  display: grid;
  gap: 12px;
  background: #fff;
}


.tags{
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag{
  font-size: 12px;
  color: #000;
  border: 1px solid rgba(0,0,0,0.18);
  background: var(--surface-2);
  padding: 7px 10px;
  border-radius: 0;
  font-weight: 700;
}

/* Map */
.map-wrap{
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 0;
  overflow: hidden;
  background: #fff;
}

.location{
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  padding: 10px 10px 0;
}

.location .place{
  margin: 0;
  font-size: 13px;
  color: var(--text);
}

.location .hint{
  margin: 0;
  font-size: 12px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.map{ height: 170px; width: 100%; }

/* Empty + Footer */
.empty{
  margin-top: 16px;
  border: 1px dashed rgba(0,0,0,0.35);
  border-radius: 0;
  padding: 20px;
  background: #fff;
}

.footer{
  padding: 22px 0 32px;
  border-top: 1px solid rgba(0,0,0,0.18);
  margin-top: 26px;
}

.footer-text{
  margin: 0;
  color: var(--muted-2);
  font-size: 12px;
}

/* Leaflet */
.leaflet-container{ font-family: var(--font-body); }
.leaflet-control-attribution{
  background: rgba(255,255,255,0.90) !important;
  border: 1px solid rgba(0,0,0,0.18) !important;
  border-radius: 0 !important;
  padding: 6px 8px !important;
  margin: 10px !important;
  color: rgba(11,27,43,0.72) !important;
}
