/*
Theme Name: Besser Haus Clean
Theme URI: https://besser-haus.de
Author: Besser Haus Editorial
Author URI: https://besser-haus.de
Description: Schlankes, schnelles WordPress-Theme für besser-haus.de mit editierbaren Sidebar-Widget-Bereichen für Werbebanner/Anzeigen, 6 Kategorien und DSGVO-freundlichem System-Font-Stack (ohne externe Google Fonts).
Version: 1.1.0
License: GNU General Public License v2 or later
Text Domain: besser-haus
*/

:root {
  --bg-page: #f8faf9;
  --bg-surface: #ffffff;
  --bg-muted: #eef3f0;
  --text-main: #1c2421;
  --text-muted: #526059;
  --accent: #1b6b48;
  --accent-dark: #124b32;
  --border: #dce4df;
  --max-w: 1140px;
  --reading-w: 760px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.72;
  color: var(--text-main);
  background-color: var(--bg-page);
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-dark);
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
  flex-wrap: wrap;
}

.site-branding .site-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.site-branding a {
  text-decoration: none;
  color: var(--text-main);
}

.site-branding span {
  color: var(--accent);
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.95rem;
  font-weight: 600;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-main);
}

.main-nav a:hover {
  color: var(--accent);
}

.site-main {
  padding: 36px 0 56px;
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, var(--reading-w)) minmax(260px, 1fr);
  gap: 36px;
  align-items: start;
}

.content-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px;
}

.entry-title {
  margin-top: 0;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.entry-meta {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.entry-content h2 {
  margin-top: 32px;
  margin-bottom: 12px;
  font-size: 1.42rem;
  line-height: 1.3;
  border-left: 4px solid var(--accent);
  padding-left: 12px;
}

.entry-content h3 {
  margin-top: 24px;
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.entry-content blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--bg-muted);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
}

.entry-content blockquote p {
  margin: 0;
}

.table-responsive {
  overflow-x: auto;
  margin: 22px 0;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.entry-content th,
.entry-content td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.entry-content th {
  background: var(--bg-muted);
  font-weight: 700;
}

.entry-content tr:nth-child(even) td {
  background: #fafcfb;
}

/* Editable Sidebar & Ad Slot Styling */
.site-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-box,
.widget {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}

.sidebar-box h3,
.widget-title,
.widget h2,
.widget h3 {
  margin-top: 0;
  font-size: 1.05rem;
}

.sidebar-box ul,
.widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-box li,
.widget li {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.94rem;
}

.sidebar-box li:last-child,
.widget li:last-child {
  border-bottom: none;
}

.ad-slot-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.ad-slot-box img,
.ad-slot-box iframe,
.ad-slot-box ins {
  max-width: 100%;
  height: auto;
}

.ad-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.ad-sticky-wrap {
  position: sticky;
  top: 88px;
}

.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 28px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 10px;
}

@media (max-width: 900px) {
  .layout-grid {
    grid-template-columns: 1fr;
  }
  .content-card {
    padding: 20px;
  }
  .ad-sticky-wrap {
    position: static;
  }
}
