/* Shared page rhythm, based on Start and Über uns. */
.theme-page {
  --accent: #7fd37f;
  --layout-light: #edf3e9;
  --layout-ink: #073f3d;
  --layout-dark: rgba(8, 25, 18, .88);
  --layout-gutter: max(24px, calc((100% - 1200px) / 2));
}
.theme-page *, .theme-page *::before, .theme-page *::after { box-sizing: border-box; }
.theme-page h1, .theme-page h2 { letter-spacing: -.025em; }
.theme-page h1 { font-size: clamp(36px, 5vw, 64px); line-height: 1.08; }
.theme-page h2 { font-size: clamp(28px, 3.5vw, 42px); line-height: 1.2; }
.theme-page p, .theme-page li { line-height: 1.65; }
.theme-page img { max-width: 100%; }
.theme-page a:focus-visible, .theme-page button:focus-visible,
.theme-page input:focus-visible, .theme-page textarea:focus-visible {
  outline: 3px solid #437f37;
  outline-offset: 5px;
}
.layout-inner { width: 100%; max-width: 1200px; margin: 0 auto; }
.theme-page .page-intro,
.theme-page > .hero,
.page-maschinen > .hero-content,
.page-datenschutz > .hero-content {
  min-height: 0;
  padding: 88px var(--layout-gutter) 80px;
  background: linear-gradient(90deg, rgba(0,0,0,.72), rgba(0,0,0,.28));
  color: #fff;
  text-align: left;
}
.theme-page .page-intro h1 { max-width: 1000px; margin: 0 0 22px; }
.theme-page .page-intro h1:last-child { margin-bottom: 0; }
.theme-page .page-intro p { margin: 0; font-size: 20px; font-weight: 300; }
.theme-page > .hero .hero-content,
.theme-page > .hero .hero-highlight,
.page-maschinen .text-content,
.page-datenschutz .text-content {
  width: 100%; max-width: 1200px; margin: 0 auto;
  padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent;
}
.theme-page > .hero h1,
.page-maschinen .page-title,
.page-datenschutz .text-content h1 { margin: 0 0 22px; text-align: left; font-size: clamp(36px, 5vw, 64px); }
.theme-page > .hero p,
.page-maschinen .text-content p,
.page-datenschutz .text-content p { max-width: 1000px; font-size: 20px; font-weight: 300; line-height: 1.6; }
.page-maschinen > .hero-content { display: block; }
.theme-page .btn { border-radius: 8px; box-shadow: none; }
.theme-page .btn-primary { background: var(--accent); color: #123b30; }
.theme-page .btn-primary:hover { background: #a0e09a; }
.theme-page .btn-secondary { background: rgba(0,0,0,.2); color: #fff; border-color: rgba(255,255,255,.5); }
.theme-page .detail-section { padding: 72px var(--layout-gutter); }
.theme-page .detail-section h2 { margin: 0 0 28px; }
.tone-light { background: var(--layout-light); color: var(--layout-ink); }
.tone-dark { background: var(--layout-dark); color: #f9fbf8; }
.tone-light a { color: #286229; }
.theme-page .detail-main { margin: 0; padding: 0; max-width: none; }
.theme-page .content-row { margin: 0; gap: 48px; }
.theme-page .content-row .text,
.theme-page .content-row .image { min-width: 0; }
.theme-page .content-row .text { flex: 1 1 50%; }
.theme-page .content-row .image { flex: 1 1 38%; }
.theme-page .content-row .text > :first-child { margin-top: 0; }
.theme-page .content-row .image img { display: block; border-radius: 12px; }
.theme-page .vergleich, .theme-page .gallery, .theme-page .video-section { margin: 0; }
.page-maeharbeiten .vergleich { display: grid; grid-template-columns: 1fr 1fr; }
.page-maeharbeiten .vergleich img { max-width: none; aspect-ratio: 4 / 3; object-fit: cover; }
.page-maeharbeiten .gallery img { max-width: 480px; aspect-ratio: 4 / 3; object-fit: cover; }
.page-maeharbeiten .video-section { align-items: flex-start; }

/* Projects alternate across the whole page, including their images and copy. */
.page-projekte .hero-badges { margin-bottom: 8px; }
.page-projekte .hero-highlight { margin-top: 4px; }
.page-projekte .projects-section { padding: 0; background: transparent; }
.page-projekte .projects-inner,
.page-projekte .projects-grid { display: contents; }
.page-projekte .section-header {
  padding: 72px var(--layout-gutter) 0; margin: 0;
  background: var(--layout-light); color: var(--layout-ink); text-align: left;
}
.page-projekte .section-header p { max-width: 800px; margin: 0; }
.page-projekte .project-card {
  margin: 0; padding: 72px var(--layout-gutter); gap: 48px;
  border: 0; border-radius: 0; box-shadow: none; transform: none;
  background: var(--layout-dark); color: #f9fbf8;
}
.page-projekte .project-card:nth-child(odd) { background: var(--layout-light); color: var(--layout-ink); }
.page-projekte .project-card:nth-child(odd) .project-kicker { color: #437f37; background: #e0ecd9; border-color: #c4d8bb; }
.page-projekte .project-card:nth-child(odd) .meta-chip { background: #e0ecd9; border-color: #c4d8bb; }
.page-projekte .project-card:nth-child(odd) .btn-secondary,
.page-projekte .cta-box .btn-secondary { background: transparent; border-color: #769572; color: var(--layout-ink); }
.page-projekte .project-card:nth-child(odd) .btn-secondary:hover,
.page-projekte .cta-box .btn-secondary:hover { background: #dce9d5; }
.page-projekte .project-image { min-width: 0; }
.page-projekte .project-image img { display: block; }
.page-projekte .project-thanks { font-weight: 700; }
.page-projekte .cta-box {
  max-width: none; margin: 0; padding: 72px var(--layout-gutter);
  background: var(--layout-light); color: var(--layout-ink);
  border: 0; border-radius: 0; box-shadow: none;
}

/* Overview pages use light sections with dark panels, as on the home page. */
.page-leistungen > .hero { gap: 0; }
.page-leistungen > .hero .page-title { width: 100%; max-width: 1200px; margin-inline: auto; }
.page-leistungen #leistungen,
.page-maschinen .machines-section,
.page-datenschutz .privacy-section { padding: 72px var(--layout-gutter); background: var(--layout-light); color: var(--layout-ink); }
.page-leistungen .cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.page-leistungen .card,
.page-maschinen .machine-card { background: #103f32; color: #f9fbf8; border: 1px solid rgba(255,255,255,.15); border-radius: 12px; box-shadow: none; }
.page-maschinen .machine-card { max-width: none; padding: 22px; }
.page-maschinen .machines-section { text-align: left; }
.page-maschinen .machine-grid { gap: 24px; }
.page-datenschutz .privacy-card { max-width: 1200px; padding: 0; background: transparent; }
.page-datenschutz .privacy-card a { color: #286229; text-underline-offset: 3px; }

/* Preserve the original two-card contact layout on light surfaces. */
.page-kontakt .contact-section {
  padding: 140px 20px 80px;
  background: rgba(0, 0, 0, .4);
}
.page-kontakt .contact-layout {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}
.page-kontakt .contact-card, .page-kontakt .imprint-card {
  padding: 30px 28px;
  border-radius: 10px;
  background: var(--layout-light);
  color: var(--layout-ink);
}
.page-kontakt .contact-card h1, .page-kontakt .imprint-card h2 { margin: 0 0 16px; font-weight: 700; }
.page-kontakt .contact-card h1 { font-size: calc(var(--heading-section, 34px) + 6px); }
.page-kontakt .imprint-card h2 { font-size: 24px; }
.page-kontakt .contact-card p, .page-kontakt .imprint-card p { margin: 6px 0; font-size: calc(16px + 2pt); line-height: 1.6; }
.page-kontakt .contact-layout a { color: #286229; }
@media (min-width: 980px) {
  .page-kontakt .contact-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.page-kontakt form { margin-top: 28px; }
.page-kontakt input[type="text"], .page-kontakt input[type="email"], .page-kontakt textarea {
  width: 100%; padding: 12px 14px; background: #f9fbf8; color: #073f3d; border-color: #94ab8d; font-family: inherit;
}
.page-kontakt button[type="submit"] { border-radius: 8px; background: #437f37; color: #fff; }
.page-kontakt button[type="submit"]:hover { background: #32642a; }
.page-kontakt .status-message.success { color: #245622; border-color: #719a65; background: #deecd8; }
.page-kontakt .status-message.error { color: #842222; border-color: #bd8080; background: #f9e8e8; }
.page-kontakt .imprint-card p { margin: 6px 0; }

@media (max-width: 899px) {
  .theme-page .page-intro, .theme-page > .hero,
  .page-maschinen > .hero-content, .page-datenschutz > .hero-content { padding-top: 64px; padding-bottom: 56px; }
  .page-projekte .project-card { gap: 28px; }
}
@media (max-width: 640px) {
  .theme-page { --layout-gutter: 20px; }
  .theme-page .detail-section, .page-projekte .project-card,
  .page-projekte .cta-box, .page-leistungen #leistungen,
  .page-maschinen .machines-section, .page-datenschutz .privacy-section { padding-block: 48px; }
  .page-projekte .section-header { padding-top: 48px; }
  .theme-page .content-row { gap: 28px; }
  .theme-page .content-row .text, .theme-page .content-row .image { width: 100%; }
  .page-maeharbeiten .vergleich { grid-template-columns: 1fr; }
  .theme-page .gallery { grid-template-columns: minmax(0, 1fr); }
  .page-maschinen .machine-grid { grid-template-columns: minmax(0, 1fr); }
  .page-kontakt .page-intro h1 { overflow-wrap: anywhere; }
}

.theme-page .detail-section p, .theme-page .detail-section li { font-size: calc(17px + 2pt); }
.theme-page .detail-section p { margin-block: 0 16px; }
.theme-page .detail-section p:last-child { margin-bottom: 0; }
.theme-page .detail-section video { max-width: 100%; }
