/*
Theme Name: Firmenauftritt
Theme URI: https://example.com/firmenauftritt
Author: Dein Name
Description: Professioneller Firmenauftritt mit Startseite (Hero, Leistungen, Über uns, Kennzahlen, Call-to-Action, Kontaktformular). Alle Inhalte im Customizer änderbar.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: firmenauftritt
Tags: business, one-column, custom-logo, custom-menu, featured-images, translation-ready, responsive-layout
*/

:root {
  --accent: #1a73e8;
  --text: #1f2430;
  --muted: #667085;
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --border: #e4e7ec;
  --radius: 10px;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.25; margin: 1.6em 0 .5em; }
h1 { font-size: 2.1rem; } h2 { font-size: 1.6rem; } h3 { font-size: 1.3rem; }
blockquote {
  margin: 1.5em 0; padding: .5em 1.2em;
  border-left: 4px solid var(--accent); background: var(--bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
}
pre, code { background: var(--bg-alt); border-radius: 6px; }
code { padding: .1em .35em; }
pre { padding: 1em; overflow: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { border: 1px solid var(--border); padding: .5em .75em; text-align: left; }

.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus {
  background: #fff; clip: auto; clip-path: none; height: auto; width: auto;
  padding: .75em 1em; left: 8px; top: 8px; z-index: 100000; box-shadow: 0 0 8px rgba(0,0,0,.3);
}

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.site-title { margin: 0; font-size: 1.4rem; font-weight: 700; line-height: 1.2; }
.site-title a { color: var(--text); text-decoration: none; }
.site-description { margin: 0; font-size: .85rem; color: var(--muted); }
.custom-logo { max-height: 48px; width: auto; }

.main-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.main-navigation a {
  display: block; padding: .5rem .85rem; color: var(--text);
  text-decoration: none; border-radius: 8px; font-weight: 500;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a { background: var(--bg-alt); color: var(--accent); }
.main-navigation .sub-menu { display: none; position: absolute; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: .4rem; min-width: 200px; flex-direction: column; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.main-navigation li { position: relative; }
.main-navigation li:hover > .sub-menu,
.main-navigation li:focus-within > .sub-menu { display: flex; }
.menu-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 8px; padding: .5rem .9rem; font: inherit; cursor: pointer; }

/* Layout */
.site-content { padding: 2.5rem 0 3.5rem; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 3rem; }
.layout.no-sidebar { grid-template-columns: minmax(0, 760px); justify-content: center; }

/* Posts */
.post-card { padding-bottom: 2rem; margin-bottom: 2rem; border-bottom: 1px solid var(--border); }
.post-card:last-child { border-bottom: 0; }
.post-thumb img { width: 100%; border-radius: var(--radius); display: block; }
.entry-title { margin: .6em 0 .2em; font-size: 1.7rem; }
.entry-title a { color: var(--text); text-decoration: none; }
.entry-title a:hover { color: var(--accent); }
.entry-meta { color: var(--muted); font-size: .9rem; }
.entry-meta a { color: var(--muted); }
.read-more { display: inline-block; margin-top: .5rem; font-weight: 600; }
.page-header { margin-bottom: 2rem; }
.page-header h1 { margin: 0; }
.entry-content > *:first-child { margin-top: 0; }
.alignwide { max-width: var(--max); }
.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { font-size: .85rem; color: var(--muted); text-align: center; }

.post-navigation .nav-links, .pagination .nav-links { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }
.pagination .page-numbers {
  display: inline-block; padding: .4rem .8rem; border: 1px solid var(--border);
  border-radius: 8px; text-decoration: none; margin-right: .25rem;
}
.pagination .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Sidebar / Widgets */
.widget { background: var(--bg-alt); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.5rem; }
.widget-title { margin: 0 0 .75rem; font-size: 1.05rem; }
.widget ul { margin: 0; padding-left: 1.1rem; }

/* Forms */
input[type="text"], input[type="email"], input[type="url"], input[type="search"], input[type="password"], textarea {
  width: 100%; padding: .65rem .8rem; border: 1px solid var(--border);
  border-radius: 8px; font: inherit; background: #fff;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
button, input[type="submit"], .button {
  background: var(--accent); color: #fff; border: 0; border-radius: 8px;
  padding: .65rem 1.2rem; font: inherit; font-weight: 600; cursor: pointer;
}
button:hover, input[type="submit"]:hover { filter: brightness(.92); }
.search-form { display: flex; gap: .5rem; }
.search-form label { flex: 1; }

/* Comments */
.comments-area { margin-top: 3rem; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 1.5rem; }
.comment-body { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.comment-meta { font-size: .9rem; color: var(--muted); }
.avatar { border-radius: 50%; vertical-align: middle; margin-right: .5rem; }

/* Footer */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 2rem 0; color: var(--muted); font-size: .95rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-navigation ul { list-style: none; display: flex; gap: 1.25rem; margin: 0; padding: 0; flex-wrap: wrap; }
.footer-navigation a { color: var(--muted); }

/* Responsive */
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .menu-toggle { display: inline-block; }
  .main-navigation { width: 100%; }
  .header-inner { flex-wrap: wrap; padding-top: .75rem; padding-bottom: .75rem; }
  .main-navigation ul { display: none; flex-direction: column; margin-top: .5rem; }
  .main-navigation.toggled ul { display: flex; }
  .main-navigation .sub-menu { display: flex; position: static; border: 0; box-shadow: none; padding-left: 1rem; }
  h1 { font-size: 1.8rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ===== Firmenauftritt ===== */
.topbar { background: #0f1b2d; color: #cbd5e1; font-size: .85rem; }
.topbar a { color: #cbd5e1; text-decoration: none; }
.topbar a:hover { color: #fff; }
.topbar-inner { display: flex; justify-content: flex-end; gap: 1.5rem; padding-top: .4rem; padding-bottom: .4rem; }
.header-btn { white-space: nowrap; text-decoration: none; display: inline-block; }
.button { display: inline-block; text-decoration: none; }
.button-light { background: #fff; color: var(--accent); }
.button-light:hover { filter: none; background: #eef3ff; }
.button-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.7); padding: calc(.65rem - 2px) 1.2rem; }
.button-outline:hover { filter: none; background: rgba(255,255,255,.12); }
body.home .site-content, body.front-page .site-content { padding: 0; }

.hero {
  background: linear-gradient(135deg, #0f1b2d 0%, var(--accent) 140%);
  background-size: cover; background-position: center; color: #fff;
}
.hero-inner { padding-top: 6rem; padding-bottom: 6rem; max-width: 880px; margin-left: 0; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin: 0 0 1rem; }
.hero-text { font-size: 1.2rem; opacity: .92; max-width: 640px; margin: 0 0 2rem; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero .container.hero-inner { margin-left: auto; margin-right: auto; }

.section { padding: 5rem 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin: 0 auto 3rem; text-align: center; }
.section-head h2, .about-text h2, .contact-info h2 { margin: 0 0 .5rem; font-size: 2rem; }
.section-head p { color: var(--muted); margin: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(15,27,45,.08); }
.card h3 { margin: .2rem 0 .5rem; font-size: 1.2rem; }
.card p { margin: 0; color: var(--muted); }
.card-icon { font-size: 2rem; width: 3.5rem; height: 3.5rem; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 12%, #fff); border-radius: 12px; margin-bottom: .75rem; }
.card-post { padding: 0; overflow: hidden; }
.card-post > *:not(a:first-child) { margin-left: 1.5rem; margin-right: 1.5rem; }
.card-post img { width: 100%; display: block; }
.card-post .entry-meta { margin-top: 1rem; }
.card-post h3 a { color: var(--text); text-decoration: none; }
.card-post p:last-child { padding-bottom: 1.5rem; }

.about { display: grid; gap: 3rem; align-items: center; }
.about.has-image { grid-template-columns: 1fr 1fr; }
.about-image img { width: 100%; border-radius: var(--radius); display: block; }

.stats { background: var(--accent); color: #fff; padding: 3rem 0; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 2rem; text-align: center; }
.stat-num { display: block; font-size: 2.6rem; font-weight: 800; line-height: 1.1; }
.stat-label { opacity: .9; }

.cta { background: #0f1b2d; color: #fff; padding: 3.5rem 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta h2 { margin: 0 0 .4rem; }
.cta p { margin: 0; opacity: .85; }

.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; }
.contact-list { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.contact-list li { margin-bottom: 1.1rem; }
.fa-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.fa-form label { display: block; font-weight: 600; margin-bottom: .3rem; }
.fa-form p { margin: 0 0 1rem; }
.fa-check label { font-weight: 400; display: flex; gap: .6rem; align-items: flex-start; }
.fa-check input { width: auto; margin-top: .45rem; }
.fa-hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.fa-notice { padding: .9rem 1.1rem; border-radius: 8px; margin: 0 0 1.2rem; }
.fa-notice-ok { background: #e7f6ec; color: #14532d; }
.fa-notice-err { background: #fdecec; color: #7f1d1d; }

.site-footer { background: #0f1b2d; color: #cbd5e1; border-top: 0; padding: 3rem 0 1.5rem; }
.site-footer a { color: #cbd5e1; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-brand { color: #fff; font-weight: 700; margin: 0 0 .5rem; }
.footer-grid p { margin: 0 0 .4rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.12); padding-top: 1.25rem; font-size: .9rem; }
.footer-bottom .footer-navigation a { color: #cbd5e1; }

@media (max-width: 860px) {
  .about.has-image, .contact-grid, .fa-row { grid-template-columns: 1fr; }
  .section { padding: 3.5rem 0; }
  .hero-inner { padding-top: 4rem; padding-bottom: 4rem; }
  .header-btn { display: none; }
  .topbar-inner { justify-content: center; }
}
