/* =============================================
   Regio-Unternehmensportal – DVW
   ============================================= */

:root {
  --color-primary: #1a3352;
  --color-primary-dark: #0f2238;
  --color-primary-light: #2d4f7a;
  --color-accent: #6fa033;
  --color-accent-hover: #5a8528;
  --color-accent-soft: #f0f7e8;
  --color-accent-border: #c5ddb0;
  --color-sky: #5ba3d9;
  --color-warm: #fdf6ec;
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-text: #1a3352;
  --color-text-muted: #4a6080;
  --color-border: #e8edf2;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-primary-light);
  text-decoration: none;
  transition: color var(--transition);
}

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

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn-ghost:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-full {
  width: 100%;
}

/* ---- Header ---- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

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

.header-inner-logo-right {
  justify-content: flex-end;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--color-text);
}

.header-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.logo-text strong {
  font-size: 0.95rem;
  color: var(--color-primary);
}

.logo-text small {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  font-weight: 400;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.main-nav a {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-text);
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ---- Hero-Banner (Startseite) ---- */

.hero-banner {
  position: relative;
  width: 100%;
  line-height: 0;
  background: #fff;
}

.hero-banner-img {
  width: 100%;
  height: auto;
  display: block;
}

.page-home .site-header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: transparent;
  border-bottom: none;
  box-shadow: none;
}

.page-home .header-inner-home {
  justify-content: flex-end;
  position: relative;
  max-width: none;
  width: 100%;
  padding: 0.75rem 1.25rem 0;
}

.page-home .nav-toggle {
  display: flex;
}

.page-home .site-header-overlay .nav-toggle span {
  background: var(--color-primary);
}

.page-home .main-nav {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  min-width: 280px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  padding: 0.35rem 0;
}

.page-home .main-nav.is-open {
  display: flex;
}

.page-home .site-header-overlay .main-nav a {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.8rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.page-home .site-header-overlay .main-nav a:last-child {
  border-bottom: none;
}

.page-home .site-header-overlay .main-nav a:hover {
  color: var(--color-accent);
  background: var(--color-accent-soft);
}

.page-home .section.regions {
  padding-top: 1.5rem;
}

/* ---- Sections ---- */

.section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

/* ---- Region Cards ---- */

.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.region-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition), box-shadow var(--transition);
}

.region-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  color: inherit;
}

.region-card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-bg);
}

.region-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
  transition: transform var(--transition);
}

.region-card:hover .region-card-image img {
  transform: scale(1.05);
}

.region-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.region-card-body h3 {
  font-size: 1.25rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.region-card-body p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  flex: 1;
  margin-bottom: 1rem;
}

.region-card-link {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-accent);
}

/* ---- Steps ---- */

.how-it-works {
  background: var(--color-warm);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.step-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
  border-radius: 50%;
  margin-bottom: 1.25rem;
}

.step-card h3 {
  font-size: 1.1rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.step-card p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* ---- Highlight ---- */

.highlight {
  background: var(--color-bg);
  color: var(--color-text);
}

.highlight .section-header {
  margin-bottom: 0;
}

/* ---- Contact ---- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}

.contact-info h2 {
  font-size: 1.75rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.contact-list {
  list-style: none;
}

.contact-list li {
  margin-bottom: 0.75rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.contact-form {
  background: var(--color-surface);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.form-row {
  margin-bottom: 1.25rem;
}

.form-row-half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-row label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--color-text);
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: border-color var(--transition);
  background: #fff;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(111, 160, 51, 0.2);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.75rem;
  text-align: center;
}

/* ---- Region Page Hero ---- */

.region-hero {
  padding: 3.5rem 0;
  color: var(--color-text);
  background-color: var(--color-accent-soft);
  background-size: cover;
  background-position: center;
  position: relative;
  border-bottom: 1px solid var(--color-accent-border);
}

.region-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(240, 247, 232, 0.94) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.region-hero .container {
  position: relative;
  z-index: 1;
}

.region-hero-dueren {
  background-image: url('../images/region-dueren.jpg');
}

.region-hero-rhein-erft {
  background-image: url('../images/region-rhein-erft-kreis.jpg');
}

.region-hero-oberberg {
  background-image: url('../images/region-oberbergischer-kreis.jpg');
}

.region-hero-aachen {
  background-image: url('../images/region-aachen.jpg');
}

.region-hero-rhein-sieg {
  background-image: url('../images/region-rhein-sieg-kreis.jpg');
}

.region-hero-dresden {
  background-image: url('../images/region-dresden.jpg');
}

.breadcrumb {
  font-size: 0.85rem;
  margin-bottom: 1rem;
  opacity: 0.85;
}

.breadcrumb a {
  color: var(--color-accent);
}

.breadcrumb span {
  margin: 0 0.4rem;
}

.region-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 0.5rem;
}

.region-hero p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

/* ---- Company Cards ---- */

.filter-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.search-input,
.filter-select {
  padding: 0.65rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  background: var(--color-surface);
}

.search-input {
  flex: 1;
  min-width: 200px;
}

.filter-select {
  min-width: 180px;
}

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

.company-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.company-card-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.company-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.company-card:hover {
  box-shadow: var(--shadow-md);
}

.company-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  min-height: 4.3rem;
}

.company-avatar {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--color-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.company-card-header h2 {
  font-size: 1.05rem;
  color: var(--color-primary);
  line-height: 1.3;
}

.company-tag {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.company-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.company-meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  margin-top: auto;
}

.company-link {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-accent);
}

/* ---- CTA Banner ---- */

.cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 3rem;
  padding: 2rem;
  background: var(--color-accent-soft);
  color: var(--color-text);
  border: 1px solid var(--color-accent-border);
  border-radius: var(--radius);
  flex-wrap: wrap;
}

.cta-banner h3 {
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}

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

/* ---- Other Regions ---- */

.section.companies {
  padding-bottom: 1.5rem;
}

.other-regions {
  background: var(--color-surface);
  padding: 1.5rem 0 2.5rem;
}

.other-regions h2 {
  font-size: 1.25rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.region-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.region-link {
  padding: 0.5rem 1.25rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-primary);
  transition: all var(--transition);
}

.region-link:hover {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

/* ---- Legal Pages ---- */

.legal-content {
  max-width: 720px;
}

.legal-content h1 {
  color: var(--color-primary);
  margin-bottom: 1.5rem;
}

.legal-content h2 {
  font-size: 1.1rem;
  margin: 1.75rem 0 0.5rem;
  color: var(--color-primary);
}

.legal-content h3 {
  font-size: 1rem;
  margin: 1rem 0 0.35rem;
  color: var(--color-primary);
}

.legal-content p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 1rem 1.25rem;
  padding-left: 0.5rem;
}

.legal-content li {
  margin-bottom: 0.35rem;
  line-height: 1.7;
}

.legal-content h4 {
  font-size: 0.95rem;
  margin: 1rem 0 0.35rem;
  color: var(--color-primary);
}

.legal-muted {
  color: var(--color-text-muted);
}

.legal-back {
  margin-top: 2rem;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 1.75rem;
  align-items: stretch;
}

.contact-card {
  display: flex;
  flex-direction: column;
  background: var(--color-warm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
}

.contact-card h3 {
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
  color: var(--color-primary);
}

.contact-card-detail {
  flex: 1;
  margin-bottom: 0.75rem;
}

.contact-card-note {
  margin-top: auto;
  margin-bottom: 0;
}

/* ---- Footer ---- */

.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 1.25rem 0;
  border-top: none;
}

.footer-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.75);
}

.site-footer a:hover {
  color: var(--color-accent);
}

.site-footer .footer-nav a,
.site-footer .footer-legal a {
  color: rgba(255, 255, 255, 0.75);
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer-brand p {
  font-size: 0.72rem;
  max-width: 260px;
  color: rgba(255, 255, 255, 0.65);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-nav a {
  font-size: 0.85rem;
}

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

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  font-size: 0.72rem;
  flex-shrink: 0;
}

@media (min-width: 769px) {
  .footer-inner {
    flex-wrap: nowrap;
  }

  .footer-legal {
    margin-left: auto;
  }
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.75);
}

.footer-legal a:hover {
  color: var(--color-accent);
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
  .page-home .header-inner-home {
    padding-right: 1rem;
  }

  .page-home .main-nav {
    min-width: min(280px, calc(100vw - 2rem));
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
  }

  .main-nav.is-open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

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

  .form-row-half {
    grid-template-columns: 1fr;
  }

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

  .footer-brand {
    flex-direction: column;
  }

  .footer-legal {
    justify-content: center;
  }

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