/*
Theme Name: BC Kanal (Neu v2)
Theme URI: https://bckanal.de
Author: BC Kanal GmbH
Description: Individuelles WordPress-Theme für die BC Kanal GmbH – Sanierung von Abwassersystemen in geschlossener Bauweise.
Version: 2.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: bckanal-v2
*/

/* ---------------------------------------------------
   1. Design tokens (aus dem Original-Design übernommen)
--------------------------------------------------- */
:root {
  --radius: 0.625rem;
  --background: oklch(0.16 0.005 260);
  --foreground: oklch(0.98 0.005 250);
  --card: oklch(0.20 0.006 260);
  --card-foreground: oklch(0.98 0.005 250);
  --primary: oklch(0.86 0.22 135);
  --primary-foreground: oklch(0.15 0.01 260);
  --secondary: oklch(0.26 0.008 260);
  --muted: oklch(0.24 0.006 260);
  --muted-foreground: oklch(0.72 0.01 260);
  --accent: oklch(0.86 0.22 135);
  --accent-foreground: oklch(0.15 0.01 260);
  --border: oklch(0.30 0.008 260);
  --input: oklch(0.30 0.008 260);
  --ring: oklch(0.86 0.22 135);
}

/* ---------------------------------------------------
   2. Reset & Base
--------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; border-color: var(--border); }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
main { flex: 1 0 auto; }

/* ---------------------------------------------------
   3. Layout helpers
--------------------------------------------------- */
.container { max-width: 80rem; margin-inline: auto; padding-inline: 1rem; }
.container-lg { max-width: 64rem; margin-inline: auto; padding-inline: 1rem; }
.container-md { max-width: 56rem; margin-inline: auto; padding-inline: 1rem; }
.container-sm { max-width: 48rem; margin-inline: auto; padding-inline: 1rem; }
.section { padding-block: 4rem; }
.section-tight { padding-block: 3rem; }
.border-t { border-top: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }
.border-y { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.bg-card-tint { background-color: color-mix(in oklab, var(--card) 40%, transparent); }
.bg-primary-tint { background-color: color-mix(in oklab, var(--primary) 10%, transparent); }
.text-center { text-align: center; }

/* ---------------------------------------------------
   4. Typography utilities
--------------------------------------------------- */
.eyebrow { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--primary); font-weight: 600; }
.heading-xl { font-size: 2.25rem; margin-top: 0.75rem; }
.heading-lg { font-size: 1.875rem; }
.lead { font-size: 1.125rem; color: var(--muted-foreground); margin-top: 1.5rem; }
.muted { color: var(--muted-foreground); }
.muted p + p { margin-top: 1rem; }
.stack > * + * { margin-top: 1.5rem; }
@media (min-width: 768px) {
  .heading-xl { font-size: 3rem; }
}

/* ---------------------------------------------------
   5. Buttons & links
--------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 0.5rem;
  padding: 0.65rem 1.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: filter .15s ease, background-color .15s ease, color .15s ease;
}
.btn-primary { background-color: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-outline { border: 1px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background-color: var(--primary); color: var(--primary-foreground); }
.link-primary { color: var(--primary); font-weight: 600; font-size: 0.875rem; }
.link-primary:hover { text-decoration: underline; }

/* ---------------------------------------------------
   5b. Bilder / Custom Logo
--------------------------------------------------- */
.logo-image img { max-height: 44px; width: auto; display: block; }
.about-split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .about-split { grid-template-columns: 1fr 1fr; } }
.about-image img, .page-image img {
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  width: 100%;
  height: auto;
  object-fit: cover;
  max-height: 420px;
}
.hero-card-img { background-size: cover; background-position: center; border: 1px solid var(--border); }
.hero-card-img h2, .hero-card-img p, .hero-card-img .eyebrow { color: var(--foreground); }

/* ---------------------------------------------------
   6. Header
--------------------------------------------------- */
.site-header { border-bottom: 1px solid var(--border); background-color: var(--background); position: relative; z-index: 30; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-block: 1rem; gap: 1rem; }
.logo { font-size: 1.25rem; font-weight: 800; letter-spacing: 0.04em; display: flex; gap: 0.25rem; align-items: center; }
.logo .accent { color: var(--primary); }
.logo-img { max-height: 48px; width: auto; display: block; }
.nav-primary { display: none; align-items: center; gap: 2rem; font-size: 0.9rem; font-weight: 500; }
.nav-primary a:hover { color: var(--primary); }
.header-cta { display: none; }
.menu-toggle { border: 1px solid var(--border); border-radius: 0.5rem; padding: 0.5rem 0.75rem; font-size: 0.9rem; }
.mobile-nav { display: flex; flex-direction: column; gap: 0.5rem; border-top: 1px solid var(--border); padding: 1rem; }
.mobile-nav a { padding-block: 0.25rem; }
.mobile-nav a:hover { color: var(--primary); }
.mobile-nav[hidden] { display: none; }
@media (min-width: 768px) {
  .nav-primary { display: flex; }
  .header-cta { display: inline-flex; }
  .menu-toggle { display: none; }
}

/* Contact bar (homepage) */
.contact-bar { border-bottom: 1px solid var(--border); background-color: var(--card); }
.contact-bar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; padding-block: 0.5rem; font-size: 0.75rem; color: var(--muted-foreground); }
.contact-bar-inner a:hover { color: var(--primary); }

/* ---------------------------------------------------
   7. Cards & grids
--------------------------------------------------- */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3-lg { grid-template-columns: repeat(3, 1fr); }
}

.card {
  border: 1px solid var(--border);
  background-color: var(--card);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: border-color .15s ease;
}
.card:hover { border-color: var(--primary); }
.card-flat { border: 1px solid var(--border); background-color: var(--background); border-radius: 0.75rem; padding: 1.5rem; }

/* Hero target-group cards (homepage) */
.hero-cards { padding-block: 4rem; }
.hero-card { display: flex; flex-direction: column; justify-content: flex-end; min-height: 220px; padding: 2rem; }
.hero-card h2 { font-size: 2.25rem; margin-top: 0.5rem; }
.hero-card p { font-size: 0.9rem; color: var(--muted-foreground); margin-top: 0.75rem; }
.hero-card span.cta { margin-top: 1.5rem; display: inline-block; font-size: 0.875rem; font-weight: 600; color: var(--primary); }

/* Highlight cards */
.highlight-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border-radius: 999px;
  background-color: var(--primary); color: var(--primary-foreground);
  font-size: 0.875rem; font-weight: 700; margin-bottom: 0.75rem;
}
.highlight-card h3 { font-size: 1.125rem; }
.highlight-card p { margin-top: 0.5rem; font-size: 0.9rem; color: var(--muted-foreground); }
.highlight-card .tag { margin-top: 1rem; font-size: 0.75rem; font-weight: 600; color: var(--primary); }

/* Fact cards */
.fact-card { padding: 2rem; }
.fact-value { font-size: 2.25rem; font-weight: 700; color: var(--primary); }
.fact-label { margin-top: 0.5rem; font-size: 0.875rem; color: var(--muted-foreground); }

/* Service cards */
.service-card .num { font-size: 0.75rem; font-weight: 700; color: var(--primary); }
.service-card h3 { font-size: 1.25rem; margin-top: 0.5rem; }
.service-card p { margin-top: 0.5rem; font-size: 0.9rem; color: var(--muted-foreground); }

/* ---------------------------------------------------
   8. Page hero (Unterseiten)
--------------------------------------------------- */
.page-hero { border-bottom: 1px solid var(--border); background-color: color-mix(in oklab, var(--card) 40%, transparent); }
.page-hero-inner { max-width: 64rem; margin-inline: auto; padding: 4rem 1rem; }
@media (min-width: 768px) { .page-hero-inner { padding-block: 6rem; } }
.page-hero h1 { font-size: 2.25rem; margin-top: 0.75rem; }
.page-hero p { margin-top: 1.25rem; max-width: 48rem; font-size: 1.125rem; color: var(--muted-foreground); }
@media (min-width: 768px) { .page-hero h1 { font-size: 3rem; } }

/* ---------------------------------------------------
   9. CTA section
--------------------------------------------------- */
.cta-section { border-top: 1px solid var(--border); background-color: color-mix(in oklab, var(--primary) 10%, transparent); }
.cta-inner { max-width: 56rem; margin-inline: auto; padding: 4rem 1rem; text-align: center; }
.cta-inner h2 { font-size: 1.875rem; }
.cta-inner p { margin-top: 1rem; color: var(--muted-foreground); }
.cta-inner .btn { margin-top: 2rem; }

/* ---------------------------------------------------
   10. Service detail article
--------------------------------------------------- */
.service-article { max-width: 48rem; margin-inline: auto; padding: 4rem 1rem; }
.service-article > .lead { margin-top: 0; }
.service-section { margin-top: 2.5rem; }
.service-section h2 { font-size: 1.5rem; }
.service-section p { margin-top: 1rem; color: var(--muted-foreground); line-height: 1.7; }
.service-bullets { margin-top: 1rem; }
.service-bullets li { display: flex; gap: 0.75rem; color: var(--muted-foreground); margin-top: 0.5rem; }
.service-bullets li::before { content: ""; width: 0.375rem; height: 0.375rem; border-radius: 999px; background-color: var(--primary); margin-top: 0.5rem; flex-shrink: 0; }
.service-outro { margin-top: 2.5rem; border: 1px solid var(--border); background-color: var(--card); border-radius: 0.75rem; padding: 1.5rem; color: var(--muted-foreground); }
.service-pagination { margin-top: 4rem; display: flex; flex-direction: column; gap: 1rem; border-top: 1px solid var(--border); padding-top: 2rem; font-size: 0.875rem; }
.service-pagination a:hover { color: var(--primary); }
@media (min-width: 768px) {
  .service-pagination { flex-direction: row; justify-content: space-between; }
}

/* ---------------------------------------------------
   11. Contact page
--------------------------------------------------- */
.contact-grid { max-width: 64rem; margin-inline: auto; padding: 4rem 1rem; display: grid; gap: 2.5rem; }
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-grid h2 { font-size: 1.25rem; }
.contact-grid address { font-style: normal; margin-top: 1rem; color: var(--muted-foreground); }
.contact-grid .phone-mail { margin-top: 1.5rem; color: var(--muted-foreground); }
.contact-grid .phone-mail a { color: var(--primary); }
.contact-grid .phone-mail a:hover { text-decoration: underline; }
.emergency-box h3 { font-size: 1.125rem; }
.emergency-box p { margin-top: 0.5rem; font-size: 0.9rem; color: var(--muted-foreground); }
.emergency-box .btn { margin-top: 1rem; }

/* ---------------------------------------------------
   12. Footer
--------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); background-color: var(--card); }
.footer-grid { display: grid; gap: 2rem; padding-block: 3rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.footer-logo { font-size: 1.25rem; font-weight: 800; }
.footer-logo .accent { color: var(--primary); }
.footer-tagline { margin-top: 0.75rem; font-size: 0.875rem; color: var(--muted-foreground); }
.footer-heading { margin-bottom: 0.75rem; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-foreground); }
.footer-grid p, .footer-grid ul { font-size: 0.875rem; }
.footer-grid ul li + li { margin-top: 0.35rem; }
.footer-grid a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--border); padding-block: 1rem; text-align: center; font-size: 0.75rem; color: var(--muted-foreground); }

/* ---------------------------------------------------
   13. Misc / WP defaults
--------------------------------------------------- */
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }
.alignwide { max-width: 80rem; margin-inline: auto; }
.wp-block-image img { border-radius: 0.5rem; }

/* ---------------------------------------------------
   14. Team-Seite (blanko, manuell befüllbar)
--------------------------------------------------- */
.team-grid { display: grid; gap: 1.75rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .team-grid { grid-template-columns: repeat(3, 1fr); } }
.team-card {
  border: 1px solid var(--border);
  background-color: var(--card);
  border-radius: 0.75rem;
  overflow: hidden;
  text-align: center;
  transition: border-color .15s ease;
}
.team-card:hover { border-color: var(--primary); }
.team-photo-placeholder {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--muted);
  color: var(--muted-foreground);
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
}
.team-name-placeholder { margin-top: 1.25rem; font-weight: 700; font-size: 1.125rem; }
.team-role-placeholder { margin-top: 0.35rem; margin-bottom: 1.5rem; font-size: 0.9rem; color: var(--primary); }

/* ---------------------------------------------------
   15. Popup
--------------------------------------------------- */
.bckanal-popup-overlay {
  position: fixed; inset: 0; z-index: 100;
  background-color: rgba(0,0,0,0.65);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.bckanal-popup-overlay[hidden] { display: none; }
.bckanal-popup-box {
  position: relative;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  max-width: 28rem;
  width: 100%;
  padding: 2rem;
}
.bckanal-popup-box h3 { font-size: 1.25rem; padding-right: 1.5rem; }
.bckanal-popup-content { margin-top: 0.75rem; color: var(--muted-foreground); }
.bckanal-popup-content p + p { margin-top: 0.75rem; }
.bckanal-popup-close {
  position: absolute; top: 0.75rem; right: 0.75rem;
  font-size: 1.5rem; line-height: 1; color: var(--muted-foreground);
}
.bckanal-popup-close:hover { color: var(--primary); }
