/* Jasper Balke v0.9.4 — Smartphone-Optimierungen */

/* ── Einheitliche Vollbild-Mobile-Navigation ───── */
.jb-mob-nav {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: var(--forest-deep);
  display: flex;
  flex-direction: column;
  padding: 26px var(--page-gutter, 16px);
  overflow-y: auto;
}

.jb-mob-nav[hidden] { display: none !important; }

.jb-mob-nav-close {
  align-self: flex-end;
  background: none;
  border: 1.5px solid rgba(255, 255, 255, .3);
  border-radius: 6px;
  padding: 8px 14px;
  color: #fff;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 32px;
}

.jb-mob-nav a {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  color: #fff;
  text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  line-height: 1.1;
}

.jb-mob-nav a.jb-mob-nav__cta,
.jb-mob-nav a:last-child {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sun-bright);
  color: var(--forest);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 28px;
  border: none;
  border-radius: 6px;
}

body.jb-mob-nav-open,
body.jb-home-nav-open {
  overflow: hidden;
}

/* ── Header: Dunkelgrün + Jasper Balke, MdL ──── */
@media (max-width: 1099px) {
  body:not(.is-blog-context) .site-nav {
    display: none !important;
  }

  body:not(.is-blog-context).menu-open::before {
    display: none;
  }

  .site-header {
    background: rgba(28, 36, 27, .96);
    border-bottom-color: rgba(255, 255, 255, .08);
  }

  .brand-copy strong {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: -.02em;
    max-width: 52vw;
  }

  body:not(.is-blog-context) .brand-copy small {
    display: block;
    font-size: .52rem;
    color: rgba(255, 255, 255, .62);
    letter-spacing: .04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ── Blog: Karten mit Farbakzent + 3D ─────────── */
@media (max-width: 1099px) {
  .blog-list {
    display: grid;
    gap: 10px;
    padding: 4px 0;
  }

  .blog-list-item {
    border: 0;
  }

  .blog-list-item__link {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 16px 15px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    border-left: 4px solid var(--blog-accent, var(--green));
    box-shadow:
      0 4px 0 rgba(28, 36, 27, .09),
      0 2px 10px rgba(28, 36, 27, .06);
    transition: transform .18s ease, box-shadow .18s ease;
  }

  .blog-list-item__link:hover,
  .blog-list-item__link:focus-visible {
    padding-left: 16px;
    transform: translateY(-2px);
    box-shadow:
      0 6px 0 rgba(28, 36, 27, .08),
      0 8px 22px rgba(28, 36, 27, .1);
  }

  .blog-list-item__link:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 rgba(28, 36, 27, .1);
  }

  .blog-list-item--accent-green { --blog-accent: var(--green); }
  .blog-list-item--accent-yellow { --blog-accent: var(--sun-bright); }
  .blog-list-item--accent-red { --blog-accent: #c44b4b; }
  .blog-list-item--accent-blue { --blog-accent: #3a6ea8; }

  .blog-list-item__date {
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--sage);
  }

  .blog-list-item__title {
    font-size: .98rem;
    line-height: 1.35;
    font-weight: 650;
  }

  .blog-list-item__cat {
    font-size: .54rem;
    color: var(--blog-accent, var(--green));
  }

  .blog-list-item__excerpt {
    display: block !important;
    font-size: .78rem;
    line-height: 1.45;
    color: var(--muted);
  }

  .blog-list-item__arrow { display: none; }

  .blog-feed__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .blog-feed__head h2 { font-size: .92rem; }

  body.is-blog-context .brand-copy small {
    display: block;
    font-size: .52rem;
    color: rgba(255, 255, 255, .62);
  }

  body.is-blog-context .brand-copy strong {
    max-width: 46vw;
    font-size: .88rem;
  }
}

/* ── Startseite: Hero-Buttons ─────────────────── */
@media (max-width: 680px) {
  .jb-home-hero__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 22px;
  }

  .jb-hero-btn {
    width: 100%;
    min-height: 50px !important;
    padding: 13px 18px !important;
    font-size: .74rem !important;
    justify-content: center;
    box-shadow: 0 4px 0 rgba(0, 0, 0, .26), 0 6px 16px rgba(0, 0, 0, .18) !important;
  }

  .jb-hero-btn:active {
    transform: translateY(3px) !important;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .26) !important;
  }
}

/* ── Ausklappbare Listen (Lebenslauf etc.) ─────── */
@media (max-width: 680px) {
  .jb-mobile-expand-wrap {
    position: relative;
  }

  .jb-mobile-expandable.is-collapsed {
    max-height: 360px;
    overflow: hidden;
    position: relative;
  }

  .jb-memberships-list.jb-mobile-expandable.is-collapsed {
    max-height: 220px;
  }

  .jb-mobile-expandable.is-collapsed::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 88px;
    background: linear-gradient(to bottom, rgba(250, 250, 248, 0), var(--paper, #fafaf8) 78%);
    pointer-events: none;
  }

  .jb-about-vita .jb-mobile-expandable.is-collapsed::after {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 78%);
  }

  .jb-mobile-expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 12px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--forest);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 3px 0 rgba(28, 36, 27, .08);
    transition: transform .15s ease, box-shadow .15s ease;
  }

  .jb-mobile-expand-btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 rgba(28, 36, 27, .08);
  }
}

/* ── Footer Smartphone ────────────────────────── */
.jb-footer-compact { display: none; }

@media (max-width: 680px) {
  .jb-footer-full { display: none !important; }

  .jb-footer-compact {
    display: block;
    padding: 28px var(--page-gutter, 16px) 22px;
  }

  .site-footer--v91 {
    padding: 0;
  }

  .jb-footer-compact__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    margin-bottom: 14px;
  }

  .jb-footer-compact__brand span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.2;
  }

  .jb-footer-compact__brand strong {
    font-size: .92rem;
    font-weight: 600;
  }

  .jb-footer-compact__brand small {
    font-size: .68rem;
    color: rgba(255, 255, 255, .58);
  }

  .jb-footer-compact__address {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 16px;
    font-size: .78rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, .52);
    font-style: normal;
  }

  .jb-footer-compact__social .jb-footer-social-icons {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin: 0 0 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .jb-footer-compact__social .jb-footer-social-icons a {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
  }

  .jb-footer-compact__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
  }

  .jb-footer-legal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 6px;
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .78);
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease;
  }

  .jb-footer-legal-btn:hover {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .28);
  }

  .jb-footer-compact__copy {
    margin: 0;
    font-size: .66rem;
    color: rgba(255, 255, 255, .34);
  }
}

/* ── Wahlkreis-Karte: Zoom + Vollbild ─────────── */
.jb-wk-map-expand {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(35, 42, 34, .14);
  border-radius: 6px;
  background: rgba(255, 255, 255, .94);
  color: var(--forest);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: background .15s ease, transform .15s ease;
}

.jb-wk-map-expand:hover {
  background: #fff;
  transform: translateY(-1px);
}

.jb-wk-map-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.jb-wk-explorer__map-wrap.is-map-expanded {
  position: fixed;
  inset: 0;
  z-index: 1300;
  min-height: 100svh;
  background: var(--mist);
}

.jb-wk-explorer__map-wrap.is-map-expanded .jb-wk-map {
  inset: 0;
}

.jb-wk-explorer__map-wrap.is-map-expanded .jb-wk-map-expand {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 520;
}

.jb-wk-explorer__map-wrap.is-map-expanded .jb-wk-map-fade {
  display: none;
}

@media (max-width: 900px) {
  .jb-wk-map-toolbar {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 510;
  }

  .jb-wk-map-expand[hidden],
  .jb-wk-map-reset[hidden] {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-list-item__link,
  .jb-mobile-expand-btn,
  .jb-wk-map-expand { transition: none !important; }
}
