/* ============================================
   MHB Modern Design System
   Responsive | Dark/Light Mode | Transitions
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ========================
   CSS Custom Properties
   ======================== */
:root {
    /* Brand Colors */
    --brand-primary: #00467f;
    --brand-primary-light: #1a6bb5;
    --brand-primary-dark: #003360;
    --brand-accent: #aa2e34;
    --brand-accent-light: #d44a50;
    --brand-accent-dark: #8a1e24;

    /* Light Mode (default) */
    --bg-body: #f0f2f5;
    --bg-layout: #ffffff;
    --bg-card: #ffffff;
    --bg-sidebar: #f8f9fa;
    --bg-header: var(--brand-primary);
    --bg-footer: #e8ecf0;
    --text-footer: #4a5568;
    --text-footer-link: #00467f;
    --bg-nav-btn: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-light) 100%);
    --bg-nav-btn-hover: linear-gradient(135deg, var(--brand-primary-light) 0%, #2a8fd4 100%);
    --bg-nav-active: linear-gradient(135deg, #e8eef4 0%, #d6e0ea 100%);
    --bg-newsbox: #f0f2f5;
    --bg-overlay: rgba(0, 0, 0, 0.7);

    --text-primary: #1a1a2e;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --text-on-primary: #ffffff;
    --text-link: var(--brand-accent);
    --text-link-hover: var(--brand-accent-dark);
    --text-nav-active: var(--brand-primary);

    --border-color: #e2e8f0;
    --border-light: #edf2f7;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;

    /* Border Radius */
    --radius-sm: 5px;
    --radius-md: 6px;
    --radius-lg: 11px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 300ms ease;
    --transition-base: 1000ms ease;
    --transition-slow: 1500ms ease;

    /* Layout */
    --layout-max-width: 1400px;
    --sidebar-width: 240px;
    --header-height: 170px;
}

/* ========================
   Dark Mode
   ======================== */
[data-theme="dark"] {
    --bg-body: #0f1419;
    --bg-layout: #1a2332;
    --bg-card: #1e2d3d;
    --bg-sidebar: #162029;
    --bg-header: #0d1926;
    --bg-footer: #0a1018;
    --bg-nav-btn: linear-gradient(135deg, #1a3a5c 0%, #1e4d7a 100%);
    --bg-nav-btn-hover: linear-gradient(135deg, #1e4d7a 0%, #2a6da8 100%);
    --bg-nav-active: linear-gradient(135deg, #0d2240 0%, #142e4c 100%);
    --bg-newsbox: #162029;

    --text-primary: #e2e8f0;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    --text-on-primary: #e2e8f0;
    --text-link: #d44a50;
    --text-link-hover: #e66a70;
    --text-nav-active: #6db3f2;

    --border-color: #2d3748;
    --border-light: #1e2d3d;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.5);
}

/* ========================
   Reset & Base
   ======================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-base), color var(--transition-base);
}

img {
    border: none;
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--text-link);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--text-link-hover);
}

table {
    border-collapse: collapse;
    width: 100%;
}

td {
    padding: var(--space-xs) var(--space-md) var(--space-xs) var(--space-xs);
    vertical-align: middle;
}

th {
    border-bottom: 2px solid var(--brand-accent);
    padding: var(--space-xs) var(--space-md) var(--space-xs) var(--space-xs);
    text-align: left;
    color: var(--brand-primary);
    font-weight: 600;
}

.tdr {
    text-align: right;
}

.tdb {
    color: var(--brand-primary);
    font-weight: 700;
    vertical-align: top;
}

/* ========================
   Layout Container
   ======================== */
#bk_layout {
    max-width: var(--layout-max-width);
    margin: 0 auto;
    padding: var(--space-md);
    background-color: var(--bg-layout);
    position: relative;
    min-height: 100vh;
    box-shadow: var(--shadow-lg);
    transition: background-color var(--transition-base);
}

/* Clearfix */
.my_clear {
    clear: both;
    font-size: 0;
    height: 0;
    overflow: hidden;
}

/* ========================
   Header
   ======================== */
/* ========================
   Header: 2-Spalten-Layout
   Links: Logo | Rechts: Slider
   ======================== */
#bk_header {
    display: flex;
    flex-direction: row;
    border-radius: var(--radius-lg);
    margin: var(--space-sm);
    height: 155px;
    min-height: 50px;
    overflow: hidden;
    transition: background-color var(--transition-base);
    position: relative;
}

#bk_header.all {
    /* Kein Hintergrundbild mehr – Slider übernimmt rechts */
    background-image: none;
}

/* Linke Spalte: Logo */
#bk_header-logo-col {
    flex: 0 0 248px;
    width: 248px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    padding: var(--space-md);
    box-sizing: border-box;
    z-index: 5;
}

[data-theme="dark"] #bk_header-logo-col {
    background-color: #1e2d3d;
}

#bk_header-logo-col img {
    max-width: 210px;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Rechte Spalte: Slider */
#bk_header-slide-col {
    flex: 1 1 auto;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background-color: var(--brand-primary);
    background-image: url('head01-g.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    margin-left: 4px;
}

#bk_header-slide-col img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.70) saturate(0.75);
}

/* Header Logo (legacy – ausgeblendet, wird nicht mehr genutzt) */
#bk_headerlogo {
    display: none;
}

/* MHB Logo (legacy – ausgeblendet, wird nicht mehr genutzt) */
#bk_vierecke {
    display: none;
}

#bk_vierecke img {
    transition: transform var(--transition-base);
}

#bk_vierecke img:hover {
    transform: scale(1.05);
}

/* ========================
   Header Slideshow
   ======================== */
#headerslide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius-lg);
    z-index: 1;
}

#headerslide img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 8;
    opacity: 0;
    border-radius: var(--radius-lg);
    transition: opacity 1.5s ease-in-out;
    object-fit: cover;
    filter: brightness(0.70) saturate(0.75);
}

#headerslide img.active {
    z-index: 10;
    opacity: 1;
}

#headerslide img.last-active {
    z-index: 9;
}

/* ========================
   Top Navigation (Header)
   Nur 3 Links: Home, Wir stellen uns vor, Kontakt
   + Suchfeld – positioniert über dem Slider (rechte Spalte)
   ======================== */
#bk_header ul {
    list-style: none;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0;
    padding: 0 8px 0 8px;
    padding-top: 0;
    position: absolute;
    bottom: 0;
    left: 252px;
    right: 0;
    z-index: 20;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

#bk_header ul li {
    color: var(--text-on-primary);
    padding: 0 var(--space-md) 0 var(--space-xs);
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    padding-left: 15px;
}

#bk_header ul li.first {
    border-left: none;
}

#bk_header ul li a,
#bk_header ul li a:link,
#bk_header ul li a:visited,
#bk_header ul li a:active {
    color: rgba(255, 255, 255, 0.9);
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-xs);
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 0.3px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

#bk_header ul li a:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.18);
    text-decoration: none;
    border-radius: var(--radius-sm);
    box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.6);
}

#bk_header ul li a#bk_active {
    font-weight: 700;
}

/* Header dropdown (legacy support) */
#bk_header ul li:hover ul {
    display: flex;
}

#bk_header ul li ul {
    list-style: none;
    padding: var(--space-sm);
    margin: 0;
    display: none;
    position: absolute;
    left: 0;
    top: 28px;
    width: 300px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    flex-direction: column;
    gap: var(--space-xs);
}

#bk_header ul li ul li {
    border: none;
    padding: 0;
}

#bk_header ul li ul li a {
    color: var(--text-primary) !important;
    font-size: var(--font-size-sm) !important;
    display: block;
    padding: var(--space-xs) var(--space-sm);
}

#bk_header ul li ul li a:hover {
    background-color: var(--bg-sidebar);
}

/* ========================
   Dark Mode Toggle
   ======================== */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all var(--transition-base);
    padding: 0;
    vertical-align: middle;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: var(--shadow-hover);
}

/* ========================
   Hamburger Menu (Mobile)
   ======================== */
.hamburger {
    display: none;
    position: fixed;
    top: var(--space-lg);
    left: var(--space-lg);
    z-index: 9999;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    width: 48px;
    height: 48px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile overlay */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.nav-overlay.active {
    display: block;
    opacity: 1;
}

/* ========================
   Left Navigation (Sidebar)
   ======================== */
ul#bk_navi_left {
    list-style: none;
    float: left;
    width: var(--sidebar-width);
    margin: var(--space-sm) 0 var(--space-sm) var(--space-sm);
    padding: var(--space-md);
    background-color: var(--bg-sidebar);
    border-radius: var(--radius-lg);
    height: fit-content;
    transition: all var(--transition-base);
}

ul#bk_navi_left li {
    padding: 2px 0;
}

ul#bk_navi_left li a,
ul#bk_navi_left li a:link,
ul#bk_navi_left li a:visited,
ul#bk_navi_left li a:active {
    display: block;
    padding: var(--space-sm) var(--space-md);
    text-decoration: none;
    color: var(--text-on-primary);
    font-size: var(--font-size-sm);
    font-weight: 600;
    border-radius: var(--radius-md);
    background: var(--bg-nav-btn);
    border: 1px solid transparent;
    transition: all var(--transition-base);
    letter-spacing: 0.2px;
}

ul#bk_navi_left li a:hover {
    background: var(--bg-nav-btn-hover);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

ul#bk_navi_left li a#bk_aktive_left {
    background: var(--bg-nav-active);
    color: var(--text-nav-active);
    font-weight: 700;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

/* Button color variants */
ul#bk_navi_left li a.bk_button_01 {
    background: var(--bg-nav-btn);
}

ul#bk_navi_left li a.bk_button_02 {
    background: linear-gradient(135deg, #1a5b8c 0%, #2778b5 100%);
}

ul#bk_navi_left li a.bk_button_03 {
    background: linear-gradient(135deg, #2a6da8 0%, #3a8dd4 100%);
}

ul#bk_navi_left li a.bk_button_04 {
    background: linear-gradient(135deg, #1a5b8c 0%, #2778b5 100%);
}

ul#bk_navi_left li a.bk_button_05 {
    background: linear-gradient(135deg, #0d3d66 0%, #1a5b8c 100%);
}

ul#bk_navi_left li a.bk_button_06 {
    background: linear-gradient(135deg, #003360 0%, #00467f 100%);
}

[data-theme="dark"] ul#bk_navi_left li a.bk_button_02 {
    background: linear-gradient(135deg, #132d47 0%, #1a4068 100%);
}

[data-theme="dark"] ul#bk_navi_left li a.bk_button_03 {
    background: linear-gradient(135deg, #1a3a5c 0%, #1e507a 100%);
}

/* Sub Navigation */
ul#bk_navi_left li ul {
    list-style: none;
    padding: var(--space-xs) 0 var(--space-xs) var(--space-sm);
    display: none;
}

ul#bk_navi_left li ul#bk_sub_open {
    display: block;
    animation: slideDown 0.3s ease;
}

ul#bk_navi_left li ul li a,
ul#bk_navi_left li ul li a:link,
ul#bk_navi_left li ul li a:visited,
ul#bk_navi_left li ul li a:active {
    display: block;
    padding: var(--space-xs) var(--space-sm) var(--space-xs) var(--space-lg);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
    font-weight: 500;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    position: relative;
}

ul#bk_navi_left li ul li a::before {
    content: '›';
    position: absolute;
    left: var(--space-sm);
    color: var(--brand-primary);
    font-weight: 700;
    transition: transform var(--transition-fast);
}

ul#bk_navi_left li ul li a:hover {
    background: var(--bg-sidebar);
    color: var(--text-nav-active);
    border-color: var(--brand-primary);
    transform: translateX(4px);
}

ul#bk_navi_left li ul li a:hover::before {
    transform: translateX(2px);
}

ul#bk_navi_left li ul li a#bk_sub_link {
    color: var(--text-nav-active);
    background: var(--bg-nav-active);
    font-weight: 700;
    border-color: var(--brand-primary);
}

ul#bk_navi_left li ul li a#bk_active_link {
    color: var(--text-nav-active);
    background: var(--bg-nav-active);
    font-weight: 700;
}

/* ========================
   Main Content Area
   ======================== */
#bk_content {
    margin: 0 0 0 var(--space-sm);    
    margin-bottom: 20px;
    padding: var(--space-lg) var(--space-xl);
    float: left;
    width: calc(100% - var(--sidebar-width) - var(--space-xl));
    min-height: 600px;
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: background-color var(--transition-base);
    animation: fadeInUp 0.5s ease;
}aw

#bk_content p {
    font-size: var(--font-size-base);
    line-height: 1.7;
    padding-bottom: var(--space-md);
    color: var(--text-secondary);
}

#bk_content h1,
#bk_content h3 {
    font-weight: 700;
    font-size: var(--font-size-2xl);
    padding-top: var(--space-xs);
    padding-bottom: var(--space-sm);
    color: var(--brand-primary);
    position: relative;
}

[data-theme="dark"] #bk_content h1,
[data-theme="dark"] #bk_content h3 {
    color: #6db3f2;
}

#bk_content h1::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-accent), var(--brand-primary));
    margin-top: var(--space-sm);
    border-radius: var(--radius-full);
}

#bk_content h2 {
    font-weight: 700;
    font-size: var(--font-size-xl);
    padding-top: var(--space-md);
    padding-bottom: var(--space-xs);
    color: var(--brand-primary);
}

#bk_content ul {
    list-style-position: outside;
    margin-left: var(--space-xl);
    padding-bottom: var(--space-md);
}

#bk_spacer {
    float: right;
    width: 1px;
    overflow: hidden;
    height: 400px;
}

/* Content Links */
#bk_content a,
#bk_content a:link,
#bk_content a:visited,
#bk_content a:active {
    color: var(--text-link);
    text-decoration: none;
    font-size: var(--font-size-base);
    transition: color var(--transition-fast);
}

#bk_content a:hover {
    color: var(--text-link-hover);
    text-decoration: underline;
}

#bk_content a.info_link,
#bk_content a.info_link:link,
#bk_content a.info_link:visited,
#bk_content a.info_link:active,
#bk_content a.info_link:active:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

#bk_content a.gr_link,
#bk_content a.gr_link:link,
#bk_content a.gr_link:visited,
#bk_content a.gr_link:active {
    color: var(--brand-accent);
    font-size: var(--font-size-xs);
    padding: 0 var(--space-xs);
    text-decoration: none;
}

#bk_content a.gr_link:hover {
    text-decoration: underline;
}

#bk_content a.m_link,
#bk_content a.m_link:link,
#bk_content a.m_link:visited,
#bk_content a.m_link:active {
    color: var(--brand-primary);
    font-size: var(--font-size-xs);
    text-decoration: none;
}

/* ========================
   Product Cards / Overview
   ======================== */
.ueberblick {
    width: 100%;
    padding: var(--space-sm);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    transition: all var(--transition-base);
    text-align: center;
}

/* Grid-Wrapper für Hauptseiten: füllt volle Breite */
.ueberblick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
    margin: var(--space-md) 0;
}

.ueberblick:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--brand-primary);
}

.ueberblick img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-sm);
    transition: transform var(--transition-base);
}

.ueberblick:hover img {
    transform: scale(1.03);
}

.ueberblick p {
    text-align: center;
    padding-top: var(--space-sm);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-primary);
    width: 100%;
    word-break: break-word;
    hyphens: auto;
    margin: 0;
}

.ueberblick a {
    text-decoration: none !important;
}

.ueberblick2 {
    float: left;
    width: auto;
    padding: var(--space-sm);
    margin: var(--space-sm) var(--space-lg);    
    display: grid;
    justify-content: center;
}

.ueberblick2 p {
    text-align: center;
    padding-top: var(--space-sm);
    font-size: var(--font-size-sm);
}

/* ========================
   Homepage Boxes
   ======================== */
.bk_homebox {
    margin: var(--space-md) 0 0 0;
    padding: var(--space-sm);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    transition: background-color var(--transition-base);
}

.bk_homebox h1 {
    font-weight: 700;
    font-size: var(--font-size-lg);
    color: var(--brand-primary);
    margin-top: 0;
    margin-bottom: var(--space-xs);
}

.bk_homebox p {
    font-size: var(--font-size-sm);
    line-height: 1.5;
    padding-top: var(--space-sm);
}

.bk_homebox img {
    width: 140px;
    height: 105px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    transition: all var(--transition-base);
    cursor: pointer;
}

.bk_homebox img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-primary);
}

/* ========================
   Intro Section (Homepage)
   ======================== */
.intro-section {
    background-color: var(--bg-card);
    padding: var(--space-lg) var(--space-xl);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    box-shadow: var(--shadow-sm);
    margin: var(--space-md) 0 var(--space-sm) 0;
    margin-bottom: 25px;
    border-left: 4px solid var(--brand-primary);
    transition: background-color var(--transition-base);
}

.intro-section h2 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: var(--space-md);
    float: none !important;
    padding-top: 0 !important;
    width: auto;
}

[data-theme="dark"] .intro-section h2 {
    color: #6db3f2;
}

.intro-section p {
    font-size: var(--font-size-base);
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    padding-bottom: 0;
}

/* ========================
   Product Section Headings
   ======================== */
.product-section-heading {
    float: none !important;
    clear: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    background-color: rgba(0, 70, 127, 0.08);
    border-left: 3px solid var(--brand-primary);
    border-radius: 0 20px 20px 0;
    padding: 10px 14px 10px 10px !important;
    margin: 10px 0 10px 0 !important;
}

.product-section-heading .section-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--brand-primary);
    line-height: 1.2;
}

.product-section-heading .section-subtitle {
    font-size: 0.72rem;
    font-weight: 400;
    font-style: italic;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.product-section-text {
    display: none;
}

[data-theme="dark"] .product-section-heading {
    background-color: rgba(109, 179, 242, 0.1);
    border-left-color: #6db3f2;
}

[data-theme="dark"] .product-section-heading .section-title {
    color: #6db3f2;
}

[data-theme="dark"] .product-section-heading .section-subtitle {
    color: var(--text-secondary);
}

/* ========================
   Product Grid (Homepage)
   ======================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: var(--space-md);
    margin: var(--space-md) 0;
}

.product-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
    color: var(--text-primary);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.product-card:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-hover);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    text-decoration: none !important;
}

.product-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-light);
    display: block;
    transition: transform var(--transition-base);
}

.product-card:hover img {
    transform: scale(1.04);
}

.product-card h3 {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.8em !important;
    font-weight: 600;
    text-align: center;
    margin: auto 0;
    color: inherit;
    word-break: break-word;
    hyphens: auto;
    overflow-wrap: break-word;
}

/* ========================
   Service Section (Homepage)
   ======================== */
.service-section {
    margin: var(--space-md) 0;
    padding: var(--space-lg) var(--space-xl);
    background-color: var(--bg-newsbox);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    transition: background-color var(--transition-base), border-color var(--transition-base);
}

.service-section h2 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: var(--space-md);
    float: none !important;
    padding-top: 0 !important;
    width: auto;
    display: block;
}

[data-theme="dark"] .service-section h2 {
    color: #6db3f2;
}

.service-grid {
    display: flex;
    flex-wrap: wrap;    
    justify-content: space-between;
    gap: var(--space-sm);
    align-items: flex-start;
}

/* Why MHB Box */
.why-mhb-box {
    display: flex;
    gap: 2rem;
    background: #e4ecf3;
    color: #1c3557;
    border-radius: var(--radius-lg, 12px);
    padding: 1.5rem 2rem;
    margin: 2rem 0 1rem;
    align-items: center;
}
.why-mhb-left {
    flex: 0 0 30%;
    max-width: 30%;
}
.why-mhb-left h2 {
    font-size: 1.2em;
    font-weight: 800;
    color: #1c3557;
    margin: 0 0 0.5em;
    line-height: 1.25;
}
.why-mhb-left p {
    font-size: 0.85rem;
    color: #3a4e60;
    line-height: 1.6;
    margin: 0;
}
.why-mhb-right {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem 1.5rem;
}
.why-mhb-item {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
}
.why-mhb-icon {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    background: rgba(28,53,87,0.15);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.why-mhb-icon svg {
    stroke: #1c3557;
}
.why-mhb-item strong {
    display: block;
    color: #1c3557;
    font-size: 0.88em;
    margin-bottom: 0.1em;
}
.why-mhb-item p {
    margin: 0;
    color: #3a4e60;
    font-size: 0.8rem;
    line-height: 1.4;
}
@media (max-width: 768px) {
    .why-mhb-box {
        flex-direction: column;
        align-items: flex-start;
    }
    .why-mhb-left {
        flex: none;
        max-width: 100%;
    }
    .why-mhb-right {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 900px) {
    .service-grid {
        flex-wrap: nowrap;
    }
}

.service-grid a {
    flex: 1 1 0;
    min-width: 0;
}

.service-grid img {
    width: 100%;
    height: 115px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    opacity: 0.8;
    transition: all var(--transition-base);
    display: block;
}

.service-grid img:hover {
    opacity: 1;
    transform: scale(1.06);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-primary);
}

/* Service Grid – Bildkarten mit Overlay-Beschriftung */
.service-card {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    display: block;
    transition: box-shadow var(--transition-base), border-color var(--transition-base);
}

.service-card img {
    border: none;
    border-radius: 0;
    display: block;
    transition: transform var(--transition-base), opacity var(--transition-base);
}

.service-card figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(28,53,87,0.90) 0%, rgba(28,53,87,0.40) 75%, transparent 100%);
    color: #fff;
    font-size: clamp(0.5rem, 1.2vw, 0.72rem);
    font-weight: 600;
    text-align: center;
    padding: 0.5em 0.3em 0.25em;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    transition: background var(--transition-base);
}

.service-grid a:hover .service-card {
    box-shadow: var(--shadow-md);
    border-color: var(--brand-primary);
}

.service-grid a:hover .service-card img {
    transform: scale(1.06);
    opacity: 1;
}

.service-grid a:hover .service-card figcaption {
    background: linear-gradient(to top, rgba(28,53,87,0.98) 0%, rgba(28,53,87,0.60) 75%, transparent 100%);
}

/* ========================
   Newsbox / Service
   ======================== */
#bk_newsbox {
    margin: var(--space-md) 0 0 0;
    padding: var(--space-md);
    background-color: var(--bg-newsbox);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    transition: background-color var(--transition-base), border-color var(--transition-base);
}

#bk_newsbox h1 {
    font-weight: 700;
    font-size: var(--font-size-lg);
    color: var(--brand-primary);
    margin-bottom: var(--space-sm);
    margin-left: 0;
    padding-top: 0;
}

[data-theme="dark"] #bk_newsbox h1 {
    color: #6db3f2;
}

#bk_newsbox p {
    font-size: var(--font-size-sm);
    line-height: 1.5;
    padding-top: var(--space-sm);
}

#bk_newsbox img {
    float: left;
    margin: var(--space-xs);
    width: 140px;
    height: 105px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    opacity: 0.75;
    transition: all var(--transition-base);
}

#bk_newsbox img:hover {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

/* ========================
   Map Slide (Homepage)
   ======================== */
#karte-toggle {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 110px;
    background: var(--brand-primary);
    border: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    color: #fff;
    cursor: pointer;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: -4px 2px 12px rgba(0, 70, 127, 0.4);
    transition: background var(--transition-fast), transform var(--transition-fast);
    padding: 8px 0;
    line-height: 1;
}

.karte-toggle-arrow {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
}

.karte-toggle-label {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    line-height: 1;
}

#karte-toggle:hover {
    background: var(--brand-primary-light);
    transform: translateY(-50%) translateX(-3px);
}

#karte-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(calc(50vw + 100%), -50%); /* komplett rechts außerhalb */
    width: 400px;
    padding: var(--space-lg);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 199;
    text-align: center;
    overflow-y: auto;
    max-height: 90vh;
}

#karte-panel.open {
    transform: translate(-50%, -50%); /* zentriert im Viewport */
}

.karte-heading {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--brand-primary);
    text-align: center;
    margin: 0 0 var(--space-sm) 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.karte-hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: var(--space-sm);
    line-height: 1.4;
}

#karte-panel img {
    display: block;
    margin: 0 auto;
}

#karte-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 198;
    backdrop-filter: blur(2px);
}

#karte-overlay.active {
    display: block;
}

/* ========================
   Footer
   ======================== */
ul#bk_footer {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin: var(--space-md) var(--space-sm) 0;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-footer);
    border-radius: var(--radius-lg);
    clear: both;
    gap: var(--space-sm);
}

ul#bk_footer li.left {
    color: var(--text-footer, #4a5568);
    font-size: var(--font-size-xs);
}

ul#bk_footer li.right {
    color: var(--text-footer, #718096);
    font-size: var(--font-size-xs);
}

ul#bk_footer li.right a,
ul#bk_footer li.right a:link,
ul#bk_footer li.right a:visited,
ul#bk_footer li.right a:active {
    text-decoration: none;
    color: var(--text-footer-link, #00467f);
    font-size: var(--font-size-xs);
    padding: 0 var(--space-sm);
    transition: color var(--transition-fast);
}

ul#bk_footer li.right a:hover {
    color: var(--brand-accent, #aa2e34);
    text-decoration: underline;
}

/* Dark Mode Footer */
[data-theme="dark"] ul#bk_footer li.left {
    color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] ul#bk_footer li.right {
    color: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] ul#bk_footer li.right a,
[data-theme="dark"] ul#bk_footer li.right a:link,
[data-theme="dark"] ul#bk_footer li.right a:visited {
    color: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] ul#bk_footer li.right a:hover {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

/* ========================
   Sitemap
   ======================== */
ul#bk_sitemap {
    margin-left: 0;
    margin-top: var(--space-sm);
}

ul#bk_sitemap li ul {
    padding-left: 0;
    margin: 0;
}

ul#bk_sitemap a {
    text-decoration: none;
    padding-left: var(--space-lg);
    position: relative;
}

ul#bk_sitemap a::before {
    content: '›';
    position: absolute;
    left: var(--space-sm);
    color: var(--brand-accent);
    font-weight: 700;
}

ul#bk_sitemap li a {
    font-size: var(--font-size-sm);
    color: var(--brand-accent);
    padding-bottom: 2px;
}

ul#bk_sitemap li ul li a,
ul#bk_sitemap li ul li a:link,
ul#bk_sitemap li ul li a:visited,
ul#bk_sitemap li ul li a:active {
    padding-left: var(--space-xl);
    text-decoration: none;
    color: var(--brand-primary);
    font-size: var(--font-size-xs);
}

ul#bk_sitemap li ul li a:hover {
    color: var(--brand-accent);
}

/* ========================
   Modern Lightbox
   ======================== */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
    cursor: pointer;
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
    animation: lightboxZoomIn 0.3s ease;
}

.lightbox-close {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10001;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    border: none;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10001;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    border: none;
    user-select: none;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lightbox-prev {
    left: var(--space-lg);
}

.lightbox-next {
    right: var(--space-lg);
}

/* ========================
   Nav-Suche (im Header-Menü)
   ======================== */
.bk-nav-search {
    border-left: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding: 4px 6px 4px 10px !important;
    display: flex;
    align-items: center;
}

#bk_suche {
    position: relative;
    display: inline-flex;
    align-items: center;
}

#bk_suche input[type="text"] {
    padding: 3px 8px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: var(--font-size-xs);
    background: rgba(255, 255, 255, 0.32);
    color: #fff;
    width: 140px;
    transition: width var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

#bk_suche input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.85);
}

#bk_suche input[type="text"]:focus {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.45);
    width: 185px;
    outline: none;
}

#bk_suche input[type="submit"] {
    padding: var(--space-xs) var(--space-md);
    background: var(--brand-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
}

#bk_suche input[type="submit"]:hover {
    background: var(--brand-primary-light);
}

/* Search results dropdown */
#bk_suchergebnisse {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    min-width: 270px;
    max-height: 320px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 300;
}

.bk-search-item {
    display: block;
    padding: 9px 14px;
    color: var(--text-primary) !important;
    font-size: var(--font-size-sm);
    text-decoration: none !important;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast), color var(--transition-fast);
}

.bk-search-item:last-child {
    border-bottom: none;
}

.bk-search-item:hover {
    background: var(--bg-sidebar);
    color: var(--brand-primary) !important;
    text-decoration: none !important;
}

.bk-search-item mark {
    background: transparent;
    color: var(--brand-accent);
    font-weight: 700;
}

.bk-search-noresult {
    padding: 10px 14px;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

/* ========================
   Content Images
   ======================== */
#bk_content img {
    border-radius: var(--radius-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

#bk_content img:hover {
    box-shadow: var(--shadow-md);
}

/* Images in links (lightbox triggers) */
#bk_content a[rel^="lightbox"] img {
    cursor: zoom-in;
    border: 1px solid var(--border-light);
}

#bk_content a[rel^="lightbox"] img:hover {
    transform: scale(1.03);
    border-color: var(--brand-primary);
}

/* ========================
   Produkt-Galerie
   ======================== */
.product-gallery {
    margin: var(--space-md) 0 var(--space-xl);
}

/* Feature-Badges (Hinweis-Icons rechts neben dem Hauptbild) */
.gallery-top {
    display: flex;
    align-items: stretch;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
}
.gallery-top .gallery-main {
    flex: 1;
    min-width: 0;
}
.feature-badges {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
    flex-shrink: 0;
    padding-top: 2px;
}
.feature-badges img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: var(--radius-md);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.feature-badges img:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.gallery-main {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-md);
}

.gallery-main img {
    max-width: 500px;
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    cursor: zoom-in;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.gallery-main img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-hover);
}

.gallery-main video {
    max-width: 500px;
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: block;
}

.gallery-thumb-video {
    background: #1a1a2e;
    color: #fff;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
}

.gallery-thumb {
    width: 110px;
    height: 82px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
    cursor: pointer;
    opacity: 0.65;
    transition: opacity var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
    display: block;
}

.gallery-thumb:hover {
    opacity: 1;
    border-color: var(--brand-primary-light);
    transform: scale(1.06);
}

.gallery-thumb.active {
    opacity: 1;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 2px var(--brand-primary);
}

/* Video-Thumbnail mit Play-Overlay */
.gallery-thumb-video-wrap {
    position: relative;
    width: 110px;
    height: 82px;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
    overflow: hidden;
    opacity: 0.65;
    transition: opacity var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}
.gallery-thumb-video-wrap:hover {
    opacity: 1;
    border-color: var(--brand-primary-light);
    transform: scale(1.06);
}
.gallery-thumb-video-wrap.active {
    opacity: 1;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 2px var(--brand-primary);
}
.gallery-thumb-video-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
    border: none;
    opacity: 1;
    cursor: pointer;
}
.gallery-thumb-video-wrap::after {
    content: '\25B6';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0,0,0,0.7);
    background: rgba(0,0,0,0.25);
    pointer-events: none;
}

/* Versteckte Lightbox-Anker (off-screen, aber per JS klickbar) */
.lb-hidden-set {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ========================
   Animations
   ======================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }

    to {
        opacity: 1;
        max-height: 1000px;
    }
}

@keyframes lightboxZoomIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Fade-in on scroll */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================
   Contact Form
   ======================== */
.kontakt-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--space-xl);
    align-items: start;
}

.kontakt-form-card,
.kontakt-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
}

.kontakt-form-card h1 {
    font-size: var(--font-size-xl);
    color: var(--brand-primary);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
}

.kontakt-info-card h2 {
    font-size: var(--font-size-lg);
    color: var(--brand-primary);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--brand-primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.form-group label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.form-group label .required {
    color: var(--brand-accent);
    margin-left: 2px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px var(--space-md);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(0, 70, 127, 0.15);
    background: var(--bg-card);
}

.form-group textarea {
    resize: vertical;
    min-height: 130px;
}

.form-submit {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-top: var(--space-sm);
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px var(--space-xl);
    background: var(--bg-nav-btn);
    color: var(--text-on-primary);
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-submit:hover {
    background: var(--bg-nav-btn-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-reset {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 10px;
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color var(--transition-fast), color var(--transition-fast);
}

.btn-reset:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.form-privacy {
    font-size: 10px !important;
    color: var(--text-muted);
    margin-top: var(--space-sm);
}

.form-privacy a {
    font-size: 10px !important;
    color: var(--text-link);
}

.kontakt-info-item {
    display: flex;
    gap: var(--space-sm);
    align-items: flex-start;
    margin-bottom: var(--space-md);
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.kontakt-info-item strong {
    color: var(--text-primary);
    display: block;
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.kontakt-info-icon {
    width: 32px;
    height: 32px;
    background: var(--bg-nav-btn);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 15px;
    color: #fff;
}

.kontakt-map {
    margin-top: var(--space-lg);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.kontakt-map iframe {
    display: block;
    width: 100%;
    height: 220px;
    border: 0;
}

.kontakt-hours {
    background: var(--bg-sidebar);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-top: var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.kontakt-hours strong {
    color: var(--brand-primary);
    display: block;
    margin-bottom: var(--space-xs);
}

@media (max-width: 900px) {
    .kontakt-layout {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ========================
   Print Styles
   ======================== */
@media print {

    .theme-toggle,
    .hamburger,
    .nav-overlay,
    ul#bk_navi_left,
    #bk_header ul,
    ul#bk_footer {
        display: none !important;
    }

    #bk_content {
        width: 100% !important;
        float: none !important;
        margin: 0 !important;
        box-shadow: none !important;
    }

    body {
        background: #fff !important;
        color: #000 !important;
    }
}

/* ========================
   Responsive Breakpoints
   ======================== */

/* Tablet (max 1024px) */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 200px;
    }

    #bk_layout {
        padding: var(--space-sm);
    }

    #bk_content {
        width: calc(100% - var(--sidebar-width) - var(--space-lg));
        padding: var(--space-md);
    }

    #karte-panel,
    #karte-toggle {
        display: none;
    }

    #bk_header-logo-col {
        flex: 0 0 208px;
        width: 208px;
    }

    #bk_header ul {
        left: 212px;
    }
}

/* Mobile-landscape & small tablet (max 768px) */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    #bk_header {
        min-height: 100px;
        border-radius: var(--radius-md);
        flex-direction: column;
        height: auto;
    }

    #bk_header-logo-col {
        flex: 0 0 auto;
        width: 100%;
        border-radius: var(--radius-md) var(--radius-md) 0 0;
        padding: var(--space-sm);
        height: 70px;
    }

    #bk_header-logo-col img {
        max-height: 55px;
    }

    #bk_header-slide-col {
        flex: 0 0 100px;
        height: 100px;
        border-radius: 0 0 var(--radius-md) var(--radius-md);
    }

    #bk_header ul {
        display: none;
    }

    #bk_headerlogo {
        display: none;
    }

    #bk_vierecke {
        display: none;
    }

    #headerslide img {
        left: 0;
        width: 100%;
        top: 0;
    }

    #headerslide {
        height: 100%;
        border-radius: 0 0 var(--radius-md) var(--radius-md);
    }

    ul#bk_navi_left {
        position: fixed;
        top: 0;
        left: -300px;
        width: 280px;
        height: 100vh;
        z-index: 999;
        margin: 0;
        border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
        overflow-y: auto;
        box-shadow: var(--shadow-lg);
        transition: left var(--transition-base);
        background-color: var(--bg-sidebar);
    }

    ul#bk_navi_left.open {
        left: 0;
    }

    #bk_content {
        width: 100%;
        float: none;
        margin: var(--space-sm) 0 0 0;
        padding: var(--space-md);
        border-radius: var(--radius-md);
    }

    .bk_homebox {
        justify-content: center;
    }

    .bk_homebox img {
        width: 120px;
        height: 90px;
    }

    .ueberblick {
        margin: var(--space-xs);
    }


    ul#bk_footer {
        flex-direction: column;
        text-align: center;
        gap: var(--space-xs);
        margin: var(--space-sm) 0;
    }

    ul#bk_footer li.left,
    ul#bk_footer li.right {
        float: none;
    }

    #karte-panel,
    #karte-toggle {
        display: none;
    }
}

/* Phone (max 480px) */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    #bk_header {
        min-height: 80px;
        margin: var(--space-xs);
        border-radius: var(--radius-sm);
    }

    #bk_content {
        padding: var(--space-sm);
    }

    #bk_content h1 {
        font-size: var(--font-size-xl);
    }

    .bk_homebox img {
        width: 100px;
        height: 75px;
    }

    .ueberblick img {
        width: 130px !important;
        height: auto !important;
    }

    #bk_newsbox img {
        width: 100px;
        height: 75px;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        top: var(--space-sm);
        right: var(--space-sm);
    }

    .hamburger {
        width: 40px;
        height: 40px;
        top: var(--space-sm);
        left: var(--space-sm);
    }
}

/* ========================
   Legacy support for old layout IDs
   ======================== */
#bk_layout1,
#bk_layout2,
#bk_layout3,
#bk_layout4,
#bk_layout5,
#bk_layout6,
#bk_layout7 {
    max-width: var(--layout-max-width);
    margin: auto;
    padding-bottom: var(--space-md);
    position: relative;
    background-repeat: no-repeat;
}

/* Scrollbar styling (dark mode) */
[data-theme="dark"] ::-webkit-scrollbar {
    width: 8px;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--bg-body);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-full);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ========================
   Produkt-Tabs
   ======================== */
.product-tabs {
    margin: var(--space-lg) calc(-1 * var(--space-xl)) var(--space-xl);
    overflow: hidden;
}

.tab-nav {
    display: flex;
    flex-wrap: wrap;
    background: var(--bg-sidebar);
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 12px var(--space-lg);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    white-space: nowrap;
    transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.tab-btn:hover {
    color: var(--brand-primary);
    background: var(--bg-card);
}

.tab-btn.active {
    color: var(--brand-primary);
    font-weight: 600;
    border-bottom-color: var(--brand-primary);
    background: var(--bg-card);
}

.tab-panel {
    display: none;
    padding: var(--space-xl);
    background: var(--bg-card);
    animation: fadeInUp 0.2s ease;
}

.tab-panel.active {
    display: block;
}

/* Zebra-Stripes für Datenblatt-Tabelle */
.tab-panel table tr:nth-child(even) {
    background-color: var(--bg-sidebar);
}

.tab-panel table tr:nth-child(odd) {
    background-color: var(--bg-card);
}

.tab-panel table tr:first-child {
    background-color: transparent;
}

.tab-panel table td {
    padding: 7px var(--space-md) 7px var(--space-sm);
    border-bottom: 1px solid var(--border-light);
}

.tab-panel table td:first-child {
    white-space: nowrap;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    width: 180px;
}

.tab-panel table td:last-child {
    font-size: var(--font-size-sm);
    color: var(--text-primary);
}

/* Tab: Platzhalter */
.tab-placeholder {
    text-align: center;
    padding: var(--space-2xl) var(--space-xl);
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.tab-placeholder-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: var(--space-md);
    opacity: 0.4;
}

/* Tab: PDF */
.pdf-download-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: var(--space-md);
}

.pdf-download-card {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 6px var(--space-md);
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.75rem !important;
    text-decoration: none;
    transition: all var(--transition-fast);
    max-width: 480px;
}

.pdf-download-card:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.pdf-icon {
    width: 28px;
    height: 28px;
    background: var(--brand-accent);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.doc-icon {
    width: 28px;
    height: 28px;
    background: var(--brand-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

/* Tab: Anfrage */
.tab-anfrage-intro {
    margin-bottom: var(--space-lg);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-sidebar);
    border-left: 3px solid var(--brand-primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.6;
}

.tab-anfrage-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.tab-anfrage-form .form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.tab-anfrage-form .form-group label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.tab-anfrage-form .form-group label .req {
    color: var(--brand-accent);
    margin-left: 2px;
}

.tab-anfrage-form .form-group a {
    font-size: 12px !important;
}

.tab-anfrage-form .form-group input,
.tab-anfrage-form .form-group textarea {
    width: 100%;
    padding: 10px var(--space-md);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-sizing: border-box;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.tab-anfrage-form .form-group input:focus,
.tab-anfrage-form .form-group textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(0, 70, 127, 0.15);
    background: var(--bg-card);
}

.tab-anfrage-form .form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.tab-anfrage-form .form-submit {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-top: var(--space-xs);
}

@media (max-width: 600px) {
    .tab-btn {
        padding: 10px var(--space-md);
        font-size: var(--font-size-xs);
    }
    .tab-panel {
        padding: var(--space-md);
    }
    .tab-anfrage-form .form-row {
        grid-template-columns: 1fr;
    }
}

/* ========================
   Leistungs-Liste (Unternehmen)
   ======================== */
.leistungs-liste {
    list-style: none;
    padding: 0;
    margin: var(--space-md) 0 var(--space-lg);
}

.leistungs-liste > li {
    position: relative;
    padding: var(--space-sm) var(--space-sm) var(--space-sm) 1.6rem;
    margin-bottom: var(--space-sm);
    border-left: 3px solid var(--brand-primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    background: var(--bg-card);
    line-height: 1.6;
}

.leistungs-liste > li::before {
    content: '›';
    position: absolute;
    left: 0.45rem;
    color: var(--brand-primary);
    font-weight: 700;
    font-size: 1.1rem;
}

.leistungs-liste--sub {
    margin: var(--space-sm) 0 0 0;
}

.leistungs-liste--sub > li {
    border-left-color: #2e7d32;
    background: transparent;
    margin-bottom: calc(var(--space-sm) / 2);
}

.leistungs-liste--sub > li::before {
    content: '○';
    color: #2e7d32;
    font-size: 0.7rem;
    top: 0.55rem;
}

/* ========================
   Stats Banner (Unternehmen)
   ======================== */
.stats-banner {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    background: linear-gradient(135deg, #003360 0%, #00467f 45%, #1a6bb5 100%);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: var(--space-xl) 0;
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .stats-banner {
    background: linear-gradient(135deg, #0a1e33 0%, #0d2a47 45%, #1a3d5c 100%);
}

.stat-item {
    flex: 1;
    min-width: 110px;
    padding: var(--space-lg) var(--space-md);
    text-align: center;
    color: #fff;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    transition: background var(--transition-base);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-item:last-child { border-right: none; }

.stat-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.stat-item::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background: rgba(255, 255, 255, 0.4);
    margin-top: auto;
    padding-top: 3px;
    border-radius: 2px;
    transition: width var(--transition-base);
    align-self: center;
    flex-shrink: 0;
}

.stat-item:hover::after { width: 50px; }

.stat-number {
    display: block;
    font-size: 2.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 5px;
}

.stat-made {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 5px;
    display: block;
}

.stat-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.stat-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.85;
}

/* ========================
   Unternehmensseite Bildergalerie
   ======================== */
.company-gallery-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    margin: var(--space-lg) 0 var(--space-md) 0;
}

.company-gallery-main a {
    display: block;
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.company-gallery-main a:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--brand-primary);
}

.company-gallery-main img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-base);
    border-radius: 0;
}

.company-gallery-main a:hover img {
    transform: scale(1.04);
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    margin-top: 0;
}

.photo-gallery a {
    display: block;
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    aspect-ratio: 4 / 3;
    position: relative;
}

.photo-gallery a:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--brand-primary);
    text-decoration: none;
}

.photo-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-base);
}

.photo-gallery a:hover img {
    transform: scale(1.07);
}

/* ========================
   Projekt-Übersichts-Grids (Projektbeispiele / Stadtmobiliar)
   ======================== */
#sonder-grid,
#bahnhof-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-md);
    margin: var(--space-md) 0 var(--space-xl);
}

.sitze-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none !important;
    color: inherit;
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.sitze-card img {
    display: block;
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-light);
}

.sitze-card-label {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    hyphens: auto;
}

.sitze-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--brand-primary);
}

.sitze-card:hover .sitze-card-label {
    color: var(--brand-primary);
}

[data-theme="dark"] .sitze-card-label {
    color: var(--text-primary);
}