/* fortyone.io static archive: language switch and project detail dialog (loaded after facelift.css) */

/* Language switch: compact segmented control in the top bar (>= 768px),
   a "Sprache / Language" row at the end of the mobile menu (< 768px) */
.header-lang {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 18px;
  padding: 2px;
  border: 1px solid #d5dfdc;
  border-radius: 999px;
  background: #fff;
}
.header-lang a {
  display: inline-block;
  min-width: 34px;
  padding: 1px 9px;
  border-radius: 999px;
  font-family: latobold, sans-serif;
  font-size: 11.5px !important;
  letter-spacing: .08em;
  line-height: 20px;
  text-align: center;
  color: #5f6669 !important;
  text-decoration: none;
}
.header-lang a:hover { color: #0e7a64 !important; }
.header-lang a.active { background: #0e7a64; color: #fff !important; }
.header-lang a:focus-visible, .lang-switch a:focus-visible { outline: 2px solid #0e7a64; outline-offset: 2px; }
@media (min-width: 768px) {
  .telMail { display: flex; justify-content: flex-end; align-items: center; }
  .telMail .header-lang { order: 2; }
}

.navbar-nav > li.lang-switch { display: none; }
@media (max-width: 767px) {
  .header-lang { display: none; }
  .navbar-nav > li.lang-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 6px 15px 14px;
    padding: 12px 0 0;
    border-top: 1px solid #e3e8e8;
  }
  .lang-switch .lang-label { font-size: 15px; color: #5f6669; }
  .lang-switch .lang-pills { display: inline-flex; padding: 2px; border: 1px solid #d5dfdc; border-radius: 999px; }
  .lang-switch .lang-pills a {
    min-width: 44px;
    padding: 6px 12px !important;
    border-radius: 999px;
    font-family: latobold, sans-serif;
    font-size: 13px !important;
    letter-spacing: .08em;
    line-height: 1.2 !important;
    text-align: center;
    color: #5f6669 !important;
  }
  .lang-switch .lang-pills a.active { background: #0e7a64; color: #fff !important; }
}

/* Project tiles open the detail dialog */
:is(#projects,#projekte) .thumb.view { cursor: pointer; }
:is(#projects,#projekte) .thumb.view:focus-visible { outline: 3px solid #0e7d68; outline-offset: 3px; }
:is(#projects,#projekte) .ref-more {
  display: inline-block;
  margin-top: 6px;
  font-weight: 700;
  color: #0e7d68;
}
:is(#projects,#projekte) .ref-more::after { content: " \203A"; }

html.ref-dialog-open { overflow: hidden; }
.ref-dialog {
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: #2b3331;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
  overflow: auto;
}
.ref-dialog::backdrop { background: rgba(20, 30, 28, .72); }
.ref-dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: #2b3331;
  font-size: 26px;
  line-height: 40px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
.ref-dialog-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  padding: 24px 56px;
  background: #f1f3f2;
}
.ref-dialog-media img { max-width: 100%; max-height: 60vh; object-fit: contain; }
.ref-dialog-nav {
  display: none;
  position: absolute;
  top: 50%;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #2b3331;
  font-size: 26px;
  line-height: 38px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
.ref-dialog-nav.prev { left: 10px; }
.ref-dialog-nav.next { right: 10px; }
.ref-dialog.has-gallery .ref-dialog-nav { display: block; }
.ref-dialog-thumbs {
  display: none;
  gap: 8px;
  padding: 12px 24px 0;
  overflow-x: auto;
}
.ref-dialog.has-gallery .ref-dialog-thumbs { display: flex; }
.ref-dialog-thumbs button {
  flex: 0 0 auto;
  width: 88px;
  height: 60px;
  padding: 3px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #f1f3f2;
  cursor: pointer;
}
.ref-dialog-thumbs button[aria-current="true"] { border-color: #0e7d68; }
.ref-dialog-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.ref-dialog-body { padding: 20px 24px 28px; }
.ref-dialog-body h2 { margin: 0 0 8px; font-size: 24px; font-weight: 700; line-height: 1.3; color: #2b3331; float: none; }
.ref-dialog-body p { margin: 0; font-size: 17px; line-height: 1.6; color: #4a5552; }
.ref-dialog button:focus-visible { outline: 2px solid #0e7d68; outline-offset: 2px; }
@media (max-width: 600px) {
  .ref-dialog-media { padding: 16px 48px; min-height: 180px; }
  .ref-dialog-body h2 { font-size: 20px; }
}

/* ------------------------------------------------------------------
   Fixes from the final UX review (2026-10-23)
------------------------------------------------------------------ */
/* "Zum Projekt" / "View project": text link, not the old dark bar */
:is(#projects,#projekte) .view a.info.ref-more {
  display: inline-block;
  margin: 0;
  padding: 12px 0 0 !important;
  background: none !important;
  box-shadow: none !important;
  color: #0e7a64 !important;
  font-family: latobold, sans-serif;
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none !important;
}
:is(#projects,#projekte) .view a.info.ref-more::after { content: " \2192"; }

/* Home blog cards: titles must not run past the card */
#blog_home .blogHeadlineShort { width: auto !important; }

/* Old purple accent (#922790) becomes brand teal */
a:hover, .leistung-details a, .leistung-teaser a, .more a { color: #0e7a64; }
.orange { color: #0e7a64 !important; }

/* Justified text leaves gaps on phones; empty Contao paragraphs add tall gaps */
@media (max-width: 767px) {
  .justify, .justify p, .footerBar p { text-align: left !important; }
}
:is(#referenz-detail) p:empty { display: none; }

/* Beratung illustrations: readable captions on the coloured bands */
.leistung-bigpicture p { color: #fff !important; text-shadow: 0 1px 3px rgba(0, 0, 0, .35); }

/* Left edges line up with the claim bar */
.back { padding-left: 15px; }

/* Mobile footer sitemap without gaps from floated columns */
@media (max-width: 767px) {
  #footer .sitemapLeft ul, #footer .sitemapRight ul { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
}

/* Hamburger turns into a close icon while the menu is open */
.navbar-toggle .icon-bar { transition: transform .2s, opacity .2s; }
.navbar-toggle.is-open .icon-bar:nth-of-type(2) { transform: translateY(6px) rotate(45deg); }
.navbar-toggle.is-open .icon-bar:nth-of-type(3) { opacity: 0; }
.navbar-toggle.is-open .icon-bar:nth-of-type(4) { transform: translateY(-6px) rotate(-45deg); }

/* Visible keyboard focus also on links that wrap */
a:focus-visible { outline: 2px solid #0e7a64; outline-offset: 2px; }

/* Archive note: fortyone is now Manuel Wenner (above the claim bar, scrolls away) */
.archive-note {
  background: #0b4f42;
  color: #fff;
  font-size: 15px;
  line-height: 1.5;
}
.archive-note .container { padding-top: 11px; padding-bottom: 11px; }
.archive-note p { margin: 0; padding: 0 15px; color: #fff; }
.archive-note a { color: #fff !important; font-family: latobold, sans-serif; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.archive-note a::after { content: " \2192"; }
.archive-note a:hover { color: #c9f1e6 !important; }
.archive-note a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 767px) { .archive-note { font-size: 14px; } }

/* CTA bar: link to manuelwenner.de inside the text */
.footerBar p a { color: inherit !important; text-decoration: underline; text-underline-offset: 3px; }
