/* ============================================================
   Hegau Bauelemente — Blog CSS
   Matches the main site design (dark theme, orange accent)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Montserrat:wght@600;700;800&display=swap');

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --orange:       #F5A623;
  --orange-light: #FFBE4D;
  --orange-dark:  #D68F1E;
  --bg:           #1a1a1a;
  --bg-dark:      #151515;
  --bg-card:      #1f1f1f;
  --bg-footer:    #212121;
  --bg-bottom:    #0d0d0d;
  --text:         #E0E0E0;
  --text-muted:   #9E9E9E;
  --border:       #3a3a3a;
  --quilted-stitch: #2a2a2a;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    repeating-linear-gradient(45deg,  transparent, transparent 9px, var(--quilted-stitch) 9px, var(--quilted-stitch) 10px, transparent 10px, transparent 20px),
    repeating-linear-gradient(-45deg, transparent, transparent 9px, var(--quilted-stitch) 9px, var(--quilted-stitch) 10px, transparent 10px, transparent 20px),
    repeating-linear-gradient(135deg, transparent, transparent 8px, rgba(255,255,255,0.015) 8px, rgba(255,255,255,0.015) 10px, transparent 10px, transparent 20px),
    repeating-linear-gradient(315deg, transparent, transparent 8px, rgba(0,0,0,0.08) 8px, rgba(0,0,0,0.08) 10px, transparent 10px, transparent 20px);
  background-size: 20px 20px;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', system-ui, sans-serif;
  line-height: 1.25;
}

a { color: inherit; text-decoration: none; transition: color 0.2s; }
img { max-width: 100%; height: auto; object-fit: cover; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #1a1a1a; }
::-webkit-scrollbar-thumb { background: #3a3a3a; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--orange); }

/* ---------- Layout helpers ---------- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--bg-dark);
  border-bottom: 1px solid #2a2a2a;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
}

.header-logo img {
  height: 128px;
  width: auto;
  margin: -8px 0;
  display: block;
}

/* Signature orange line */
.header-line {
  height: 4px;
  background: linear-gradient(to right, transparent 0%, #FFA500 15%, #FFA500 85%, transparent 100%);
  transform: skewY(-0.5deg);
  transform-origin: center bottom;
  box-shadow: 0 2px 8px rgba(255,165,0,0.4), 0 0 20px rgba(255,165,0,0.2);
}

/* Desktop nav */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.nav-links a,
.nav-links span.sep {
  padding: 0.5rem 0.75rem;
  color: #BDBDBD;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--orange);
}

.nav-links span.sep {
  color: #444;
  padding: 0;
}

.nav-phone {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--orange);
  color: #000;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  white-space: nowrap;
  transition: background 0.2s;
}

.nav-phone:hover { background: var(--orange-light); color: #000; }

.nav-phone svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Hamburger button */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle svg { width: 24px; height: 24px; }

/* Mobile menu */
.nav-mobile {
  display: none;
  background: #212121;
  border-top: 1px solid #2a2a2a;
}

.nav-mobile.open { display: block; }

.nav-mobile nav {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.5rem;
}

.nav-mobile a {
  padding: 0.75rem 0;
  color: #BDBDBD;
  border-bottom: 1px solid #2a2a2a;
  font-size: 0.9375rem;
}

.nav-mobile a:hover { color: var(--orange); }
.nav-mobile a:last-of-type { border-bottom: none; }

.nav-mobile .mobile-phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--orange);
  color: #000;
  font-weight: 700;
  padding: 0.75rem;
  border-radius: 4px;
  margin-top: 1rem;
  border-bottom: none !important;
}

/* ---------- Blog Hero (Overview Page) ---------- */
.blog-hero {
  background-color: var(--bg-dark);
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(245,166,35,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(245,166,35,0.03) 0%, transparent 60%);
  pointer-events: none;
}

.blog-hero-label {
  display: inline-block;
  color: var(--orange);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.blog-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: #fff;
  margin-bottom: 0.75rem;
}

.blog-hero p {
  color: var(--text-muted);
  font-size: 1.0625rem;
  max-width: 600px;
}

/* ---------- Blog Grid ---------- */
.blog-section {
  padding: 3rem 0 4rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

/* ---------- Article Card ---------- */
.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.article-card:hover {
  border-color: var(--orange);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.article-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  background: #2a2a2a;
}

.article-card-img-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #222 0%, #2a2a2a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-card-img-placeholder svg {
  width: 48px;
  height: 48px;
  color: #444;
}

.article-card-body {
  padding: 1.375rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.article-card-category {
  color: var(--orange);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.article-card h2 {
  font-size: 1.0625rem;
  color: #fff;
  line-height: 1.4;
  flex: 1;
}

.article-card p {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--orange);
  font-weight: 600;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  transition: gap 0.2s;
}

.article-card-link:hover { gap: 0.6rem; color: var(--orange); }

.article-card-link svg { width: 14px; height: 14px; }

/* ---------- Article Page ---------- */
.article-hero {
  background-color: var(--bg-dark);
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
}

.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.article-breadcrumb a { color: var(--text-muted); }
.article-breadcrumb a:hover { color: var(--orange); }
.article-breadcrumb .sep { color: #444; }
.article-breadcrumb .current { color: var(--text); }

.article-hero-category {
  display: inline-block;
  color: var(--orange);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.875rem;
}

.article-hero h1 {
  font-size: clamp(1.625rem, 4vw, 2.375rem);
  color: #fff;
  margin-bottom: 1rem;
  max-width: 800px;
}

.article-hero-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.article-hero-meta span { display: flex; align-items: center; gap: 0.375rem; }
.article-hero-meta svg { width: 15px; height: 15px; color: var(--orange); }

/* Cover image */
.article-cover {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  margin: 2rem 0;
  border: 1px solid var(--border);
}

/* Article body layout */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  padding: 2.5rem 0 4rem;
  align-items: start;
}

/* Article content */
.article-content {
  color: var(--text);
  font-size: 1.0625rem;
  line-height: 1.8;
}

.article-content h2 {
  font-size: 1.5rem;
  color: #fff;
  margin: 2rem 0 0.875rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--orange);
  display: inline-block;
}

.article-content h3 {
  font-size: 1.1875rem;
  color: #fff;
  margin: 1.5rem 0 0.625rem;
}

.article-content p { margin-bottom: 1.25rem; }

.article-content ul,
.article-content ol {
  margin: 0.5rem 0 1.25rem 1.25rem;
}

.article-content li { margin-bottom: 0.5rem; }

.article-content strong { color: #fff; }

.article-content a { color: var(--orange); text-decoration: underline; }
.article-content a:hover { color: var(--orange-light); }

.article-content blockquote {
  border-left: 3px solid var(--orange);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: rgba(245,166,35,0.05);
  border-radius: 0 4px 4px 0;
  color: var(--text-muted);
  font-style: italic;
}

.article-content .highlight-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--orange);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.article-content .highlight-box p:last-child { margin-bottom: 0; }

/* Article sidebar */
.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 110px;
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.sidebar-card h3 {
  font-size: 1rem;
  color: #fff;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-cta {
  border-left: 3px solid var(--orange);
}

.sidebar-cta .cta-phone {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--orange);
  font-weight: 700;
  font-size: 1.125rem;
  margin: 0.75rem 0;
}

.sidebar-cta .cta-phone svg { width: 18px; height: 18px; }

.sidebar-cta p { font-size: 0.875rem; color: var(--text-muted); }

.sidebar-cta .cta-btn {
  display: block;
  text-align: center;
  background: var(--orange);
  color: #000;
  font-weight: 700;
  padding: 0.75rem;
  border-radius: 4px;
  margin-top: 1rem;
  font-size: 0.9375rem;
  transition: background 0.2s;
}

.sidebar-cta .cta-btn:hover { background: var(--orange-light); color: #000; }

/* Table of contents */
.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-list li {
  border-bottom: 1px solid var(--border);
}

.toc-list li:last-child { border-bottom: none; }

.toc-list a {
  display: block;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.toc-list a:hover { color: var(--orange); }

/* Related articles */
.related-list { display: flex; flex-direction: column; gap: 0.75rem; }

.related-item {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.related-item a {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.related-item a:hover { color: var(--orange); }

.related-item span {
  font-size: 0.75rem;
  color: #666;
}

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(245,166,35,0.1);
  border: 1px solid rgba(245,166,35,0.25);
  color: var(--orange);
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* ---------- Footer ---------- */
.footer-cta {
  background: var(--orange);
  padding: 1.125rem 0;
}

.footer-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-cta-phone {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: #000;
}

.footer-cta-phone svg { width: 24px; height: 24px; }

.footer-cta-text {
  color: #000;
  font-weight: 500;
}

.site-footer {
  background: var(--bg-footer);
  padding: 3rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-logo {
  height: 80px;
  width: auto;
  margin-bottom: 1rem;
  display: block;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.65;
}

.footer-col h4 {
  font-size: 0.9375rem;
  color: #fff;
  margin-bottom: 1rem;
  letter-spacing: 0.04em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--orange); }

.footer-links svg { width: 14px; height: 14px; color: var(--orange); flex-shrink: 0; }

.footer-contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-contact-list svg { width: 18px; height: 18px; color: var(--orange); flex-shrink: 0; margin-top: 1px; }

.footer-contact-list a { color: var(--text-muted); }
.footer-contact-list a:hover { color: var(--orange); }

.footer-bottom {
  background: var(--bg-bottom);
  padding: 1rem 0;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-bottom p {
  color: #555;
  font-size: 0.8125rem;
}

.footer-bottom-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-bottom-links a {
  color: #555;
  font-size: 0.8125rem;
  transition: color 0.2s;
}

.footer-bottom-links a:hover { color: var(--orange); }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: block; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 767px) {
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-cta-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 639px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .header-inner { height: 72px; }
  .header-logo img { height: 96px; }
}
