:root {
    --primary: #003366;
    --primary-light: #004d99;
    --accent: #e63312;
    --accent-hover: #cc2200;
    --bg-light: #f5f7fa;
    --bg-white: #ffffff;
    --text: #333333;
    --text-light: #666666;
    --border: #dde1e6;
    --success: #28a745;
}

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

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    line-height: 1.5;
}

/* Header – exakt wie fuss-emv.de: NICHT fixiert */
.site-header {
    background: var(--bg-white);
}
/* Zeile 1: Logo col-4 + Meta-Nav col-8 */
.header-row {
    max-width: 1140px;
    margin: 0 auto;
    padding: 1rem 15px;
    display: flex;
    align-items: center;
}
.header-logo-col { flex: 0 0 33.333%; }
.logo { display: inline-block; }
.logo img { width: 195px; height: auto; }
.header-meta-col { flex: 0 0 66.666%; text-align: right; }
.header-meta { font-size: 0.875rem; }
.header-meta a { color: var(--primary); text-decoration: none; }
.header-meta a:hover { text-decoration: underline; }
.header-meta-item { margin-left: 1rem; }
.lang-switch { position: relative; display: inline-block; }
.lang-switch a { color: var(--primary); text-decoration: none; }
.lang-switch .lang-arrow { margin-left: 0.5em; position: relative; top: 1px; }
.lang-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #fff;
    min-width: 5rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.175);
    padding: 1rem 0;
    z-index: 300;
    border-radius: 0.25rem;
}
.lang-switch:hover .lang-dropdown { display: block; }
.lang-dropdown a {
    display: block;
    padding: 0.25rem 1.5rem;
    color: #212529;
    font-size: 1rem;
}
.lang-dropdown a:hover { background: #f8f9fa; text-decoration: none; }

/* Zeile 2: navbar – margin-right:6rem, color:rgba(0,0,0,0.5), aktiv:#00437b */
.main-nav-bar {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px 0.5rem;
    position: relative;
}
.main-nav {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}
.main-nav > li {
    position: relative;
    display: flex;
    align-items: center;
}
.main-nav > li > a {
    color: rgba(0,0,0,0.5);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    padding: 0.5rem 0;
    margin-right: 6rem;
    transition: color 0.15s;
    white-space: nowrap;
}
.main-nav > li:last-child > a { margin-right: 0; }
.main-nav > li > a:hover { color: #00437b; }
.main-nav > li:first-child > a { color: #00437b; }

/* Dropdown – wie Original: opacity:0.97, margin-left:-30px, padding:1.5rem 30px */
.main-nav .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    opacity: 0.97;
    margin-left: -30px;
    margin-top: -1px;
    padding: 1.5rem 30px;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.175);
    z-index: 200;
    min-width: 20rem;
}
/* Mega-Menu für Produkte (breiter, mehrspaltig) */
.main-nav > li.mega-menu > .dropdown {
    width: 684px;
}
.dropdown-columns {
    display: flex;
    flex-wrap: wrap;
}
.dropdown-col {
    flex: 0 0 50%;
    padding: 0 15px;
    margin-top: 1rem;
}
.dropdown-col:first-child,
.dropdown-col:nth-child(2) {
    margin-top: 0;
}
.dropdown-col-header {
    color: #00437b;
    display: inline-block;
    padding: 0;
    text-transform: uppercase;
    font-size: 1rem;
    font-weight: 400;
    text-decoration: none;
}
.dropdown-col-header:hover { text-decoration: underline; }
.dropdown-col ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
}
.dropdown-col ul li {
    border-top: 1px solid rgba(0,0,0,0.15);
}
.dropdown-col ul li:first-child { border-top: none; }
.dropdown-col ul li a {
    display: block;
    padding: 0.25rem 0;
    color: rgba(0,0,0,0.5);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    white-space: normal;
}
.dropdown-col ul li a:hover { color: #00437b; background: transparent; text-decoration: none; }

/* Standard-Dropdown (Service, Unternehmen) */
.main-nav .dropdown-simple {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    opacity: 0.97;
    margin-left: -30px;
    margin-top: -1px;
    padding: 1.5rem 30px;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.175);
    z-index: 200;
    min-width: 20rem;
}
/* Dropdowns öffnen per Klick (nicht Hover) – Klasse .open wird per JS gesetzt */
.main-nav li.open > .dropdown,
.main-nav li.open > .dropdown-simple { display: block; }
.dropdown-simple a {
    display: block;
    padding: 0.25rem 0;
    color: rgba(0,0,0,0.5);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    border-top: 1px solid rgba(0,0,0,0.15);
}
.dropdown-simple a:first-child { border-top: none; }
.dropdown-simple a:hover { color: #00437b; text-decoration: none; }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--primary);
    cursor: pointer;
}

/* Disclaimer */
.disclaimer {
    max-width: 1140px;
    margin: 0 auto;
    padding: 1rem 15px;
    font-size: 0.75rem;
    color: #999;
    text-align: center;
    line-height: 1.5;
}

/* Footer – Original: background-color:#00437b;color:#fff;font-size:0.875rem; Bootstrap row-Layout */
.site-footer {
    background-color: #00437b;
    color: #fff;
    font-size: 0.875rem;
}
.site-footer a,
.site-footer a:active,
.site-footer a:focus,
.site-footer a:hover { color: #fff; }
/* Footer Row – wie Original Bootstrap .container py-3 > .row */
.footer-row {
    max-width: 1140px;
    margin: 0 auto;
    padding: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}
/* col-md-4 col-lg-3 */
.footer-col-copyright {
    position: relative;
    flex: 0 0 25%;
    max-width: 25%;
    padding: 0 15px;
}
/* col-md-6 */
.footer-col-links {
    position: relative;
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 15px;
}
.footer-col-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-col-links li {
    display: inline-block;
    margin-right: 0.5rem;
}
.footer-col-links a {
    color: #fff;
    text-decoration: none;
    font-size: 0.84rem;
}
.footer-col-links a:hover { text-decoration: underline; }
/* col-md-2 col-lg-3 */
.footer-col-right {
    position: relative;
    flex: 0 0 25%;
    max-width: 25%;
    padding: 0 15px;
}
.footer-col-right a {
    color: #fff;
    text-decoration: none;
}
.footer-col-right a:hover { opacity: 0.8; }
.footer-facebook { display: inline-block; }
.footer-facebook img,
.footer-facebook svg { width: 26px; height: 26px; vertical-align: middle; }
.to-top-link {
    position: absolute;
    right: 0;
    margin-right: -15px;
    top: -5px;
    font-size: 1.25rem;
    line-height: normal;
}
.to-top-link svg { width: 25px; height: 25px; }

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 60px 0 50px;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 40%;
    background: url('https://www.fuss-emv.de/fileadmin/images/buehne/drosselherstellung.jpg') center/cover;
    opacity: 0.15;
}
.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}
.hero h1 {
    font-size: 2.4em;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}
.hero h1 span { color: #ffcc00; }
.hero p {
    font-size: 1.15em;
    max-width: 650px;
    margin-bottom: 32px;
    opacity: 0.92;
}

/* Search Box */
.search-section {
    background: var(--bg-white);
    margin-top: -30px;
    position: relative;
    z-index: 10;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    padding: 32px 40px;
}
.search-section h2 {
    font-size: 1.3em;
    margin-bottom: 8px;
    color: var(--primary);
}
.search-section p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 0.95em;
}
.search-row {
    display: flex;
    gap: 12px;
}
.search-input {
    flex: 1;
    padding: 14px 18px;
    font-size: 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--primary); }
.search-input::placeholder { color: #aaa; }
.search-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.search-btn:hover { background: var(--accent-hover); }
.search-examples {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-light);
}
.search-examples code {
    background: var(--bg-light);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}
.search-examples code:hover { background: #e0e5ec; }
.search-hint {
    margin-top: 14px;
    font-size: 0.8rem;
    color: #888;
    line-height: 1.5;
}

/* Results */
.results-container {
    margin-top: 20px;
    display: none;
}
.result-card {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 12px;
    border-left: 4px solid var(--success);
}
.result-card .match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.result-card .match-label {
    background: var(--success);
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}
.result-card .old-number {
    color: var(--text-light);
    font-size: 14px;
}
.result-card .new-product {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--primary);
}
.result-note {
    font-size: 0.85em;
    color: #e63312;
    margin-top: 4px;
    font-style: italic;
}
.result-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    margin-top: 10px;
}
.result-specs .spec {
    font-size: 13px;
}
.result-specs .spec-label {
    color: var(--text-light);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.no-results {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

/* USP Strip */
.usp-strip {
    background: var(--bg-light);
    padding: 40px 0;
    margin-top: 40px;
}
.usp-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
.usp-item {
    text-align: center;
    padding: 20px;
}
.usp-icon {
    font-size: 2.5em;
    margin-bottom: 12px;
}
.usp-item h3 {
    font-size: 1em;
    color: var(--primary);
    margin-bottom: 6px;
}
.usp-item p {
    font-size: 0.85em;
    color: var(--text-light);
}

/* Products Grid */
.products-section {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 24px;
}
.products-section > h2 {
    font-size: 1.8em;
    color: var(--primary);
    text-align: center;
    margin-bottom: 8px;
}
.products-section > p {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 40px;
}
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.product-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.product-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.product-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--bg-light);
}
.product-card-body {
    padding: 20px;
}
.product-card h3 {
    font-size: 1.05em;
    color: var(--primary);
    margin-bottom: 6px;
}
.product-card .product-specs {
    font-size: 0.85em;
    color: var(--text-light);
    margin-bottom: 12px;
}
.product-card .product-replaces {
    font-size: 0.8em;
    background: var(--bg-light);
    padding: 6px 10px;
    border-radius: 4px;
    color: var(--text-light);
}
.product-card .product-replaces strong { color: var(--text); }
.product-card .product-note {
    font-size: 0.78em;
    color: #e63312;
    margin: 6px 0 0;
    font-style: italic;
}

/* Cross-Reference Table */
.table-section {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 24px;
}
.table-section h2 {
    font-size: 1.8em;
    color: var(--primary);
    text-align: center;
    margin-bottom: 8px;
}
.table-section > p {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 30px;
}
.table-filter-row {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.table-filter-btn {
    padding: 8px 18px;
    border: 2px solid var(--border);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}
.table-filter-btn:hover,
.table-filter-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}
.table-scroll-wrapper {
    max-height: 480px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.xref-table {
    width: 100%;
    min-width: 1000px;
    border-collapse: collapse;
    font-size: 13px;
}
.xref-table thead {
    background: var(--primary);
    color: white;
    position: sticky;
    top: 0;
    z-index: 2;
}
.xref-table th {
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
}
.xref-table th:nth-child(1),
.xref-table td:nth-child(1) { width: 16%; }
.xref-table th:nth-child(2),
.xref-table td:nth-child(2) { width: 10%; }
.xref-table td {
    padding: 7px 14px;
    border-bottom: 1px solid var(--border);
}
.xref-table tbody tr:hover { background: #eef3fa; }
.xref-table .fuss-number {
    font-weight: 700;
    color: var(--primary);
}
.fuss-note {
    font-weight: 400;
    font-size: 11px;
    color: #e63312;
    display: block;
    margin-top: 2px;
}
.aehnl-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.aehnl-direkt { background: #d4edda; color: #155724; }
.aehnl-funktional { background: #fff3cd; color: #856404; }
.aehnl-hoeherwertig { background: #cce5ff; color: #004085; }
.aehnl-anfrage { background: #f8d7da; color: #721c24; }
.db-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.db-link:hover { text-decoration: underline; }
.result-db-link {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 14px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}
.result-db-link:hover { background: var(--primary-light); }
.xref-table th, .xref-table td { font-size: 12px; }
.table-count {
    text-align: right;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 8px;
}
.table-disclaimer {
    margin-top: 12px;
    padding: 10px 14px;
    background: #fff8e1;
    border-left: 3px solid #f9a825;
    font-size: 12px;
    color: #5d4037;
    line-height: 1.5;
    border-radius: 0 4px 4px 0;
}
.table-disclaimer a {
    color: #e65100;
    text-decoration: underline;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
    margin-top: 50px;
}
.cta-section h2 {
    font-size: 1.8em;
    margin-bottom: 12px;
}
.cta-section p {
    font-size: 1.1em;
    opacity: 0.9;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.cta-btn {
    padding: 14px 36px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}
.cta-btn-primary {
    background: var(--accent);
    color: white;
}
.cta-btn-primary:hover { background: var(--accent-hover); }
.cta-btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.5);
}
.cta-btn-secondary:hover {
    border-color: white;
    background: rgba(255,255,255,0.1);
}

/* Trust Bar */
.trust-bar {
    background: var(--bg-white);
    padding: 30px 0;
    border-top: 1px solid var(--border);
}
.trust-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
}
.trust-item {
    text-align: center;
    font-size: 13px;
    color: var(--text-light);
}
.trust-item strong {
    display: block;
    font-size: 1.6em;
    color: var(--primary);
}

/* Responsive */
@media (max-width: 900px) {
    .main-nav { display: none; }
    .nav-toggle { display: block; }
    .main-nav-bar { justify-content: flex-end; }
    .main-nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 16px rgba(0,0,0,0.12);
        border-top: 2px solid var(--accent);
        padding: 8px 0;
        height: auto;
    }
    .main-nav.open > li { height: auto; }
    .main-nav.open > li > a { padding: 12px 24px; height: auto; padding-right: 24px; color: var(--primary); }
    .main-nav .dropdown,
    .main-nav .dropdown-simple {
        position: static;
        box-shadow: none;
        margin-left: 0;
        padding: 8px 20px;
        width: auto;
    }
    .dropdown-columns { flex-direction: column; }
    .dropdown-col { flex: 0 0 100%; }
    .main-nav > li.mega-menu > .dropdown { width: auto; }
    .header-meta { display: none; }
}
@media (max-width: 768px) {
    .hero h1 { font-size: 1.6em; }
    .search-row { flex-direction: column; }
    .usp-inner { grid-template-columns: repeat(2, 1fr); }
    .products-grid { grid-template-columns: 1fr; }
    .footer-row { flex-direction: column; text-align: center; }
    .footer-col-copyright { flex: 0 0 100%; max-width: 100%; order: 2; margin-top: 0.5rem; }
    .footer-col-links { flex: 0 0 100%; max-width: 100%; }
    .footer-col-right { flex: 0 0 100%; max-width: 100%; margin-top: 0.5rem; }
    .to-top-link { position: static; display: inline-block; margin-left: 1rem; }
}
