/* ==========================================================================
   CALIFAKTUR – Custom Stylesheet für Help Scout Docs
   Version 3.2 · Montserrat · CI-konform
   Upload: Manage > Docs > [Docs-Site] > Custom Code > Upload stylesheet
   --------------------------------------------------------------------------
   Alle Regeln wurden live gegen help.califaktur.de getestet.
   Drei Eigenheiten des Themes, die das Layout vorher zerlegt haben:
   1. ul.nav steht auf position:absolute und legte sich über das Logo
   2. .container-fluid trägt sowohl der Header als auch #contentArea
   3. #contentArea erbt einen Bootstrap-Clearfix (::before/::after), der im
      Grid zu zwei leeren Rasterzellen wird
   --------------------------------------------------------------------------
   CI: keine runden Ecken an CTAs · keine Trennlinien · Subline ÜBER der
   Headline in Versalien · Wechsel Schwarz/Weiß
   Palette: #141414 · #ffffff · #ffc72c · #424141 · #a8a7a7
   ========================================================================== */

@import url('https://fonts.bunny.net/css?family=montserrat:400,500,600,700,800');

:root {
  --cf-black:      #141414;
  --cf-white:      #ffffff;
  --cf-yellow:     #ffc72c;
  --cf-anthrazit:  #424141;
  --cf-grey:       #a8a7a7;
  --cf-surface:    #f4f4f4;
  --cf-font: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --cf-max:        1120px;
}

/* --------------------------------------------------------------------------
   1 · BASIS & TYPOGRAFIE
   -------------------------------------------------------------------------- */

body,
button,
input,
select,
textarea { font-family: var(--cf-font) !important; }

body {
  background: var(--cf-white);
  color: var(--cf-black);
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--cf-font) !important;
  color: var(--cf-black);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-transform: none;
}

h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.2rem; font-weight: 600; }

p, li { color: var(--cf-anthrazit); }

a {
  color: var(--cf-black);
  text-decoration: underline;
  text-decoration-color: var(--cf-yellow);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color .15s ease;
}
a:hover { color: var(--cf-anthrazit); }

/* Gelbe Unterlinie nur im Fließtext */
h1 a, h2 a, h3 a, h4 a,
#mainNav a,
.collection-category a,
.category-list a,
.articleList a,
.breadcrumbs a,
#sidebar a,
#relatedArticles a,
#footer a,
footer a { text-decoration: none; }

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--cf-yellow);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   2 · KOPFBEREICH (header#mainNav)
   -------------------------------------------------------------------------- */

#mainNav,
#mainNav .navbar-inner {
  background: var(--cf-black) !important;
  border: none !important;
  box-shadow: none !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0;
  padding: 0;
  filter: none;
}

/* Nur der Header-Container, NICHT #contentArea */
#mainNav .navbar-inner > .container-fluid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: var(--cf-max);
  margin: 0 auto;
  padding: 18px 28px 12px;
  text-align: center;
}

#mainNav a.brand {
  float: none !important;
  display: block;
  margin: 0 !important;
  padding: 0 !important;
  text-shadow: none;
}

/* Die Logodatei ist 250×150 px, der Schriftzug liegt als schmaler Streifen
   in der Mitte – rund 79 % der Breite, aber nur etwa 19 % der Höhe. Deshalb
   große Höhe plus negative Margins, die den transparenten Rand einsammeln.
   Größer/kleiner: height ändern und beide Margins im selben Verhältnis
   mitziehen (Faustregel: margin oben ≈ −29 % der Höhe, unten ≈ −25 %).
   Sauberer wäre ein eng beschnittenes PNG – dann height: 34px; margin: 0; */
#mainNav a.brand > img {
  height: 150px;
  width: auto;
  max-width: 100%;
  margin: -43px 0 -38px;
  display: block;
}

#mainNav .nav-collapse { width: 100%; }

/* position:static ist der Kern der Reparatur */
#mainNav ul.nav {
  position: static !important;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0 22px;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}

/* Kein display: hier setzen! Das Theme rendert zwei Kontaktlinks
   (li#contact für Desktop, li#contactMobile fürs Handy) und blendet je einen
   davon aus. Ein erzwungenes display macht beide sichtbar – daher unten
   stattdessen zwei gezielte Media Queries. */
#mainNav ul.nav > li {
  float: none !important;
  margin: 0 !important;
}

@media (min-width: 768px) {
  #mainNav ul.nav > li#contactMobile { display: none !important; }
}
@media (max-width: 767px) {
  #mainNav ul.nav > li#contact { display: none !important; }
}

#mainNav ul.nav > li > a {
  color: var(--cf-white) !important;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 9px 0 !important;
  background: none !important;
  border-radius: 0 !important;
  border-bottom: 2px solid transparent;
  text-shadow: none;
  transition: color .15s ease;
}

#mainNav ul.nav > li > a:hover,
#mainNav ul.nav > li.active > a {
  color: var(--cf-yellow) !important;
  border-bottom-color: var(--cf-yellow);
  background: none !important;
}

/* Dropdown-Dreieck ohne Funktion */
#mainNav ul.nav .caret { display: none !important; }

#mainNav .btn-navbar {
  background: transparent !important;
  border: 2px solid var(--cf-white) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0;
  padding: 8px 12px;
}
#mainNav .btn-navbar .icon-bar {
  background: var(--cf-white);
  border-radius: 0;
  box-shadow: none;
}

/* --------------------------------------------------------------------------
   3 · HERO / SUCHE
   -------------------------------------------------------------------------- */

#docsSearch {
  background: var(--cf-black) !important;
  border-bottom: none !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 44px 20px 52px;
  text-align: center;
}

#docsSearch h1 {
  color: var(--cf-white) !important;
  max-width: 820px;
  margin: 0 auto 22px;
}

/* Subline ÜBER der Headline */
#docsSearch h1::before {
  content: "CALIFAKTUR HELP CENTER";
  display: block;
  color: var(--cf-yellow);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

#docsSearch p,
#docsSearch h2 { color: var(--cf-grey) !important; }

#searchBar,
#docsSearch form {
  max-width: 680px;
  margin: 0 auto;
}

#searchBar .search-query,
#searchQuery,
input.search-query {
  background: var(--cf-white) !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--cf-black) !important;
  font-size: 1rem;
  height: auto;
  padding: 16px 18px !important;
}

#searchBar .search-query::placeholder { color: var(--cf-grey) !important; }

#searchBar button,
#searchBar .btn {
  background: var(--cf-yellow) !important;
  border: none !important;
  border-radius: 0 !important;
  color: var(--cf-black) !important;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 16px 26px !important;
  text-transform: uppercase;
  transition: background .15s ease;
}

#searchBar button:hover,
#searchBar .btn:hover {
  background: var(--cf-white) !important;
  color: var(--cf-black) !important;
}

/* --------------------------------------------------------------------------
   4 · STARTSEITE: KOLLEKTIONEN ALS KACHELN
   -------------------------------------------------------------------------- */

#contentArea:has(> .collection-category) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
  max-width: var(--cf-max);
  margin: 44px auto 0;
  padding: 0 28px;
}

/* Bootstrap-Clearfix würde sonst zwei leere Rasterzellen erzeugen */
#contentArea:has(> .collection-category)::before,
#contentArea:has(> .collection-category)::after {
  content: none !important;
  display: none !important;
}

/* Der Footer liegt innerhalb von #contentArea */
#contentArea:has(> .collection-category) > footer {
  grid-column: 1 / -1;
  margin-top: 44px;
}

.collection-category {
  background: var(--cf-surface);
  border: none;
  border-radius: 0;
  box-shadow: inset 0 0 0 0 var(--cf-yellow);
  margin: 0;
  padding: 26px 26px 24px;
  text-align: left !important;
  transition: box-shadow .18s ease, background .18s ease;
}

.collection-category:hover {
  background: var(--cf-white);
  box-shadow: inset 4px 0 0 0 var(--cf-yellow);
}

.collection-category > h2,
.collection-category > h2 a {
  color: var(--cf-black) !important;
  font-size: 1.25rem !important;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
  text-align: left !important;
}

.collection-category:hover > h2 a { color: var(--cf-anthrazit) !important; }

/* Kategorien innerhalb einer Kachel */
.collection-category .category-list {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  margin-top: 12px;
  padding: 0;
  float: none !important;
  list-style: none;
}

/* Kollektionen ohne Kategorien: die leere Liste bringt sonst 48px
   Außenabstand mit und bläht die Kachel auf */
.collection-category .category-list:not(:has(a)) { display: none !important; }

.collection-category a.category {
  display: block !important;
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 9px 0 !important;
  border: 0 !important;
  background: none !important;
  text-align: left !important;
}

.collection-category a.category h3 {
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  line-height: 1.35;
  margin: 0 !important;
  color: var(--cf-black) !important;
  text-align: left !important;
}

.collection-category a.category:hover h3 { color: var(--cf-anthrazit) !important; }

.collection-category a.category p { margin: 0 !important; text-align: left !important; }
.collection-category a.category p:empty { display: none !important; }

.collection-category a.category .article-count {
  font-size: 0.78rem !important;
  color: var(--cf-grey) !important;
  margin-top: 2px !important;
}

/* --------------------------------------------------------------------------
   5 · ARTIKELSEITE
   -------------------------------------------------------------------------- */

#fullArticle,
.article,
#main { color: var(--cf-anthrazit); }

#fullArticle { font-size: 1.05rem; }

#fullArticle h1,
.article h1 { color: var(--cf-black) !important; }

#fullArticle h2,
#fullArticle h3 {
  color: var(--cf-black) !important;
  margin-top: 2.2em;
}

#fullArticle p a,
#fullArticle li a { text-decoration: underline; }

#fullArticle img { border-radius: 0; }

#fullArticle blockquote {
  background: var(--cf-surface);
  border: none;
  border-left: 4px solid var(--cf-yellow);
  color: var(--cf-black);
  margin: 28px 0;
  padding: 18px 22px;
}

#fullArticle code,
#fullArticle pre {
  background: var(--cf-black);
  border: none;
  border-radius: 0;
  color: var(--cf-yellow);
}

#fullArticle table,
#fullArticle td,
#fullArticle th { border-color: var(--cf-surface) !important; }

#fullArticle th {
  background: var(--cf-black);
  color: var(--cf-white);
  font-weight: 600;
}

/* Artikelfußzeile steht im Theme in kursiver Serifenschrift */
.articleFoot,
.articleFoot *,
#feedback,
#feedback * {
  font-family: var(--cf-font) !important;
  font-style: normal !important;
}

.articleFoot {
  background: var(--cf-surface) !important;
  border: none !important;
  padding: 18px 22px !important;
}

.breadcrumbs,
#breadcrumbs,
.articleFoot time.lu {
  color: var(--cf-grey) !important;
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   6 · SIDEBAR & VERWANDTE ARTIKEL
   -------------------------------------------------------------------------- */

#sidebar,
.sidebar,
#relatedArticles,
.relatedArticles {
  background: var(--cf-surface);
  border: none !important;
  padding: 24px;
}

#sidebar h3,
#relatedArticles h3 {
  color: var(--cf-black) !important;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

#sidebar ul li,
#relatedArticles ul li { border: none !important; }

/* --------------------------------------------------------------------------
   7 · BUTTONS, FORMULARE, FEEDBACK
   -------------------------------------------------------------------------- */

button,
.btn,
input[type="submit"],
a.button {
  border-radius: 0 !important;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.btn-primary,
#contactModal .btn,
.contact .btn {
  background: var(--cf-yellow) !important;
  border: none !important;
  color: var(--cf-black) !important;
}

.btn-primary:hover,
#contactModal .btn:hover {
  background: var(--cf-black) !important;
  color: var(--cf-white) !important;
}

input[type="text"],
input[type="email"],
textarea,
select {
  border: 2px solid var(--cf-surface) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 12px 14px !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus { border-color: var(--cf-yellow) !important; }

#searchBar input[type="text"] { border: none !important; }

.rating a,
#feedback a {
  background: var(--cf-white);
  border-radius: 0 !important;
  color: var(--cf-black) !important;
  padding: 10px 22px;
  text-decoration: none;
}

.rating a:hover,
#feedback a:hover {
  background: var(--cf-yellow);
  color: var(--cf-black) !important;
}

/* --------------------------------------------------------------------------
   8 · FUSSBEREICH
   -------------------------------------------------------------------------- */

#footer,
footer,
.footer {
  background: var(--cf-black) !important;
  border-top: none !important;
  color: var(--cf-grey) !important;
  padding: 40px 20px;
}

#footer a,
footer a { color: var(--cf-grey) !important; }

#footer a:hover,
footer a:hover { color: var(--cf-yellow) !important; }

/* --------------------------------------------------------------------------
   9 · MOBILE & MOTION
   -------------------------------------------------------------------------- */

@media (max-width: 860px) {
  #contentArea:has(> .collection-category) {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 32px auto 0;
    padding: 0 18px;
  }
}

@media (max-width: 700px) {
  .collection-category .category-list { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  #mainNav ul.nav {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }
  #mainNav ul.nav > li > a { padding: 11px 0 !important; }
}

@media (max-width: 600px) {
  #docsSearch { padding: 36px 16px 44px; }
  #docsSearch h1::before { font-size: 0.65rem; letter-spacing: 0.16em; }
  .collection-category { padding: 20px 18px; }
  #sidebar, #relatedArticles { padding: 18px; }
  #mainNav a.brand > img { height: 118px; margin: -34px 0 -30px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
