/*
Theme Name:  PB Design
Theme URI:   https://andreas-paust.de
Description: Eigenständiges WordPress-Theme im Navy/Orange-Design (angelehnt an Partizipedia), ohne Abhängigkeit von einem Parent-Theme. Für eine andere Website nutzbar.
Author:      Dr. Andreas Paust
Version:     1.0.0
License:     GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pb-design
Tags:        two-columns, right-sidebar, custom-colors, custom-menu, featured-images, sticky-post, translation-ready
*/

/* ─────────────────────────────────────────────────────────────
   DESIGN TOKENS
───────────────────────────────────────────────────────────── */
:root {
  --navy:      #1a3a5c;
  --orange:    #e87722;
  --light-bg:  #f5f7fa;
  --text:      #2c2c2c;
  --border:    #d0d8e4;
  --white:     #ffffff;
  --link-hover:#1a3a5c;
}

/* ─────────────────────────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.75;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--orange); text-decoration: none; border-bottom: 1px dotted var(--orange); transition: color .2s, border-color .2s; }
a:hover { color: var(--link-hover); border-bottom-color: var(--link-hover); }

/* ─────────────────────────────────────────────────────────────
   HEADER
───────────────────────────────────────────────────────────── */
#site-header {
  background: var(--navy);
  padding: 14px 40px;
  display: flex;
  align-items: center;
  gap: 16px;
}

#site-branding a {
  color: var(--white);
  border: none;
  text-decoration: none;
}

.site-title {
  font-family: Georgia, serif;
  font-size: 1.3rem;
  font-weight: normal;
  letter-spacing: .02em;
  color: var(--white);
}

.site-title .brand-accent { color: var(--orange); font-weight: bold; }

.site-description {
  font-family: Arial, sans-serif;
  font-size: .8rem;
  color: #9db4cc;
  margin-top: 2px;
}

.custom-logo-link img { max-height: 60px; width: auto; }

/* ─────────────────────────────────────────────────────────────
   PRIMARY NAVIGATION
───────────────────────────────────────────────────────────── */
#primary-navigation {
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,.1);
}

#primary-navigation .nav-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

#primary-navigation ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
}

#primary-navigation ul li a {
  display: block;
  color: #cdd8e8;
  text-decoration: none;
  border: none;
  padding: 12px 18px;
  font-family: Arial, sans-serif;
  font-size: .9rem;
  transition: background .2s, color .2s;
}

#primary-navigation ul li a:hover,
#primary-navigation ul li.current-menu-item > a,
#primary-navigation ul li.current-menu-ancestor > a {
  background: var(--orange);
  color: var(--white);
}

#primary-navigation ul li { position: relative; }

#primary-navigation ul ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--navy);
  border-top: 2px solid var(--orange);
  z-index: 999;
  flex-direction: column;
}

#primary-navigation ul li:hover > ul { display: flex; }

#primary-navigation ul ul li a {
  padding: 10px 18px;
  font-size: .85rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid #cdd8e8;
  color: #cdd8e8;
  padding: 6px 12px;
  font-family: Arial, sans-serif;
  cursor: pointer;
}

/* ─────────────────────────────────────────────────────────────
   PAGE LAYOUT
───────────────────────────────────────────────────────────── */
#page-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

#primary { flex: 1; min-width: 0; }
#secondary { width: 260px; flex-shrink: 0; }
body.has-sidebar #primary { flex: 1; }
body:not(.has-sidebar) #secondary { display: none; }

/* ─────────────────────────────────────────────────────────────
   MAIN CONTENT TYPOGRAPHY
───────────────────────────────────────────────────────────── */
.entry-title,
.page-title {
  color: var(--navy);
  font-size: 2rem;
  margin-bottom: 24px;
  border-bottom: 3px solid var(--orange);
  padding-bottom: 10px;
  line-height: 1.2;
}

.entry-content h2, .entry-content h3, .entry-content h4 {
  color: var(--navy);
  font-family: Arial, sans-serif;
  margin: 1.6em 0 .7em;
}

.entry-content h2 { font-size: 1.4rem; }
.entry-content h3 { font-size: 1.15rem; }
.entry-content h4 { font-size: 1rem; }

.entry-content p  { margin-bottom: 1.1em; font-size: 1.05rem; }
.entry-content strong { color: var(--navy); }

.entry-content ul,
.entry-content ol  { margin: .5em 0 1.2em 1.5em; }
.entry-content li  { margin-bottom: .4em; font-size: 1.05rem; }

.entry-content blockquote {
  border-left: 4px solid var(--orange);
  padding: 12px 20px;
  background: var(--light-bg);
  margin: 1.5em 0;
  font-style: italic;
  border-radius: 0 4px 4px 0;
}

.entry-content code {
  background: var(--light-bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: .9em;
}

.entry-content pre {
  background: var(--light-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 16px;
  overflow-x: auto;
  margin-bottom: 1.2em;
}

.entry-content hr {
  border: none;
  border-top: 2px solid var(--orange);
  margin: 2em 0;
  opacity: .4;
}

.entry-content img { border-radius: 4px; margin: 1em 0; }
.entry-content .wp-caption-text { font-size: .85rem; color: #667; text-align: center; margin-top: .3em; }

/* ─────────────────────────────────────────────────────────────
   POST META
───────────────────────────────────────────────────────────── */
.entry-meta {
  font-family: Arial, sans-serif;
  font-size: .85rem;
  color: #667;
  margin-bottom: 1.5em;
}

.entry-meta a { color: var(--orange); border: none; }

/* ─────────────────────────────────────────────────────────────
   CARD / POST LIST
───────────────────────────────────────────────────────────── */
.post-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 24px 28px;
  margin-bottom: 28px;
  transition: box-shadow .2s;
}

.post-card:hover { box-shadow: 0 4px 16px rgba(26,58,92,.1); }

.post-card .card-title {
  font-size: 1.25rem;
  color: var(--navy);
  border: none;
  margin-bottom: 8px;
  padding: 0;
}

.post-card .card-title a { color: var(--navy); border: none; }
.post-card .card-title a:hover { color: var(--orange); }

.post-card .card-excerpt { font-size: 1rem; color: var(--text); }

.post-card .card-meta {
  font-family: Arial, sans-serif;
  font-size: .82rem;
  color: #889;
  margin-top: 12px;
}

.read-more {
  display: inline-block;
  margin-top: 12px;
  background: var(--orange);
  color: var(--white) !important;
  border: none !important;
  padding: 6px 14px;
  border-radius: 3px;
  font-family: Arial, sans-serif;
  font-size: .85rem;
  transition: background .2s;
}

.read-more:hover { background: var(--navy); }

/* ─────────────────────────────────────────────────────────────
   PAGINATION
───────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 32px;
  font-family: Arial, sans-serif;
}

.pagination .page-numbers {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--navy);
  font-size: .9rem;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

/* ─────────────────────────────────────────────────────────────
   NOTICE / HINWEISBOX
───────────────────────────────────────────────────────────── */
.hinweisbox {
  background: var(--light-bg);
  border-left: 4px solid var(--orange);
  padding: 16px 20px;
  margin: 2em 0;
  border-radius: 0 6px 6px 0;
  font-size: .95rem;
}

.hinweisbox strong,
.hinweisbox .hinweis-titel {
  display: block;
  margin-bottom: 6px;
  color: var(--navy);
  font-family: Arial, sans-serif;
}

/* ─────────────────────────────────────────────────────────────
   LEAD-ABSATZ (erster Absatz im Artikeltext)
───────────────────────────────────────────────────────────── */
.entry-content > p:first-of-type {
  border-left: 3px solid var(--orange);
  padding-left: 16px;
  font-size: 1.12rem;
}

/* ─────────────────────────────────────────────────────────────
   INFOBOX (CSS-Klasse: pp-infobox, im Editor pro Block setzbar)
───────────────────────────────────────────────────────────── */
.pp-infobox {
  background: #fdf3e9;
  border: 1px solid var(--orange);
  border-radius: 6px;
  padding: 18px 22px;
  margin: 1.8em 0;
  font-size: .98rem;
}
.pp-infobox strong:first-child,
.pp-infobox > p:first-child strong { color: var(--navy); }

/* ─────────────────────────────────────────────────────────────
   VERWANDTE BEGRIFFE / CHIPS (CSS-Klasse: pp-related-chips)
───────────────────────────────────────────────────────────── */
.pp-related-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 1.8em 0;
  padding-top: 1.2em;
  border-top: 1px solid var(--border);
}
.pp-related-chips a {
  display: inline-block;
  background: var(--light-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 14px;
  font-family: Arial, sans-serif;
  font-size: .82rem;
  color: var(--navy);
  text-decoration: none;
}
.pp-related-chips a:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

/* ─────────────────────────────────────────────────────────────
   SIDEBAR
───────────────────────────────────────────────────────────── */
.widget { margin-bottom: 28px; }

.widget-title {
  font-family: Arial, sans-serif;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: var(--light-bg);
  padding: 10px 14px;
  border-left: 3px solid var(--orange);
  color: var(--navy);
  margin-bottom: 0;
}

.widget ul { list-style: none; border: 1px solid var(--border); border-top: none; }
.widget ul li { border-bottom: 1px solid var(--border); }

.widget ul li a {
  display: block;
  color: var(--navy);
  border: none;
  padding: 8px 14px;
  font-family: Arial, sans-serif;
  font-size: .88rem;
  font-weight: bold;
}
.widget ul li a:hover { color: var(--orange); }

.widget ul li ul li a {
  font-weight: normal;
  font-size: .82rem;
  color: #445566;
  padding: 5px 14px 5px 28px;
}

/* ─────────────────────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────────────────────── */
#colophon {
  background: var(--navy);
  color: #aab8cc;
  text-align: center;
  padding: 18px 40px;
  font-family: Arial, sans-serif;
  font-size: .85rem;
  margin-top: 40px;
}

#colophon a { color: var(--orange); border: none; }
#colophon a:hover { color: var(--white); }

.footer-widgets {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 20px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  text-align: left;
}

/* ─────────────────────────────────────────────────────────────
   SEARCH FORM
───────────────────────────────────────────────────────────── */
.search-form { display: flex; gap: 0; margin-bottom: 1em; }

.search-form input[type="search"] {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 3px 0 0 3px;
  font-family: Georgia, serif;
  font-size: .95rem;
  outline: none;
}
.search-form input[type="search"]:focus { border-color: var(--navy); }

.search-form button,
.search-form input[type="submit"] {
  background: var(--orange);
  color: var(--white);
  border: none;
  padding: 8px 14px;
  border-radius: 0 3px 3px 0;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: .9rem;
  transition: background .2s;
}
.search-form button:hover { background: var(--navy); }

/* ─────────────────────────────────────────────────────────────
   404 / NO RESULTS
───────────────────────────────────────────────────────────── */
.no-results-message { text-align: center; padding: 60px 20px; color: #667; }
.no-results-message h2 { color: var(--navy); margin-bottom: 12px; }

/* ─────────────────────────────────────────────────────────────
   SKIP LINK (Barrierefreiheit)
───────────────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 10px 16px;
  z-index: 10000;
}
.skip-link:focus { left: 10px; top: 10px; }

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  #page-wrapper { flex-direction: column; }
  #secondary    { width: 100%; }
}

@media (max-width: 782px) {
  .menu-toggle { display: inline-block; }
  #primary-navigation .nav-wrapper > ul { display: none; flex-direction: column; }
  #primary-navigation.is-open .nav-wrapper > ul { display: flex; }
  #primary-navigation ul ul { position: static; display: none; }
  #primary-navigation ul li:hover > ul { display: none; }
  #primary-navigation ul li.is-open > ul { display: flex; }
}

@media (max-width: 600px) {
  #site-header  { padding: 12px 16px; }
  #page-wrapper { padding: 24px 16px; }
  .entry-title, .page-title { font-size: 1.5rem; }
  #colophon     { padding: 14px 16px; }
}
