/* Lokale Inter-Schriftarten */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* BER Color Variables */
:root {
    --ber-blue: #003366;
    --ber-red: #cc0000;
    --ber-gold: #ffcc00;
    --ber-light-blue: #e6f2ff;
    --ber-light-gray: #f8f9fa;
    --ber-dark-gray: #333333;
    --ber-text: #333333;
    --ber-white: #ffffff;
}

/* BER Schadow and rounded Images */

*, ::before, ::after {
    --tw-border-spacing-x: 0;
    --tw-border-spacing-y: 0;
    --tw-translate-x: 0;
    --tw-translate-y: 0;
    --tw-rotate: 0;
    --tw-skew-x: 0;
    --tw-skew-y: 0;
    --tw-scale-x: 1;
    --tw-scale-y: 1;
    --tw-pan-x: ;
    --tw-pan-y: ;
    --tw-pinch-zoom: ;
    --tw-scroll-snap-strictness: proximity;
    --tw-gradient-from-position: ;
    --tw-gradient-via-position: ;
    --tw-gradient-to-position: ;
    --tw-ordinal: ;
    --tw-slashed-zero: ;
    --tw-numeric-figure: ;
    --tw-numeric-spacing: ;
    --tw-numeric-fraction: ;
    --tw-ring-inset: ;
    --tw-ring-offset-width: 0px;
    --tw-ring-offset-color: #fff;
    --tw-ring-color: rgb(59 130 246 / 0.5);
    --tw-ring-offset-shadow: 0 0 #0000;
    --tw-ring-shadow: 0 0 #0000;
    --tw-shadow: 0 0 #0000;
    --tw-shadow-colored: 0 0 #0000;
    --tw-blur: ;
    --tw-brightness: ;
    --tw-contrast: ;
    --tw-grayscale: ;
    --tw-hue-rotate: ;
    --tw-invert: ;
    --tw-saturate: ;
    --tw-sepia: ;
    --tw-drop-shadow: ;
    --tw-backdrop-blur: ;
    --tw-backdrop-brightness: ;
    --tw-backdrop-contrast: ;
    --tw-backdrop-grayscale: ;
    --tw-backdrop-hue-rotate: ;
    --tw-backdrop-invert: ;
    --tw-backdrop-opacity: ;
    --tw-backdrop-saturate: ;
    --tw-backdrop-sepia: ;
    --tw-contain-size: ;
    --tw-contain-layout: ;
    --tw-contain-paint: ;
    --tw-contain-style: ;
}

.shadow-2xl {
    --tw-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}

.rounded-2xl {
    border-radius: 1rem;
}

.w-full {
    width: 100%;
}

.h-auto {
    height: auto;
}

img, svg, video, canvas, audio, iframe, embed, object {
    display: block;
    vertical-align: middle;
}

/* BER Color Variables */
:root {
    --ber-blue: #003366;
    --ber-red: #cc0000;
    --ber-gold: #ffcc00;
    --ber-light-blue: #e6f2ff;
    --ber-light-gray: #f8f9fa;
    --ber-dark-gray: #333333;
    --ber-text: #333333;
    --ber-white: #ffffff;
}

/* Bootstrap Primary Color Override */
:root {
    --bs-primary: var(--ber-blue);
    --bs-primary-rgb: 0, 51, 102;
}

/* Font Override for Bootstrap */
body {
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif;
}

/* Top Menu Styles */
.top-menu-bar {
    background-color: var(--ber-light-gray);
    border-bottom: 1px solid #e5e7eb;
}

/* Top Menu Navigation */
.top-menu {
    background-color: var(--ber-light-gray);
    border-bottom: 1px solid #e5e7eb;
    padding: 0;
}

.top-menu .level_1 {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    justify-content: flex-end;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 40px;
}

.top-menu .level_1 > li {
    position: relative;
    display: inline-block;
}

.top-menu .level_1 > li:not(:last-child)::after {
    content: '|';
    color: #d1d5db;
    margin: 0 12px;
    font-weight: 300;
}

/* Top Menu Links */
.top-menu .level_1 > li > a,
.top-menu .level_1 > li > strong {
    display: inline-block;
    color: var(--ber-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.3s ease;
    padding: 8px 0;
}

.top-menu .level_1 > li > a:hover,
.top-menu .level_1 > li > a:focus {
    color: var(--ber-blue);
}

/* Active state for top menu */
.top-menu .level_1 > li.active > strong.active {
    color: var(--ber-blue);
    font-weight: 600;
}

/* Sibling links styling */
.top-menu .level_1 > li.sibling > a.sibling {
    color: var(--ber-text);
}

.top-menu .level_1 > li.sibling > a.sibling:hover,
.top-menu .level_1 > li.sibling > a.sibling:focus {
    color: var(--ber-blue);
}

/* Top Menu Responsive Design */
@media (max-width: 1024px) {
    .top-menu .level_1 {
        padding: 0 15px;
    }
}

@media (max-width: 768px) {
    .top-menu .level_1 {
        justify-content: center;
        padding: 0 10px;
        min-height: 35px;
    }
    
    .top-menu .level_1 > li > a,
    .top-menu .level_1 > li > strong {
        font-size: 0.8rem;
        padding: 6px 0;
    }
    
    .top-menu .level_1 > li:not(:last-child)::after {
        margin: 0 8px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .top-menu .level_1 {
        flex-wrap: wrap;
        gap: 8px;
        min-height: auto;
        padding: 8px 10px;
    }
    
    .top-menu .level_1 > li:not(:last-child)::after {
        display: none;
    }
    
    .top-menu .level_1 > li {
        margin-bottom: 4px;
    }
    
    .top-menu .level_1 > li > a,
    .top-menu .level_1 > li > strong {
        font-size: 0.75rem;
        padding: 4px 8px;
        border-radius: 3px;
    }
    
    .top-menu .level_1 > li.active > strong.active {
        background-color: var(--ber-light-blue);
    }
}

/* Brand Lines Component */
.brand-lines {
    margin-top: 5px;
    display: flex;
    gap: 2px;
}

.brand-line {
    height: 4px;
    flex: 1;
    border-radius: 2px;
}

.brand-line-dark {
    background-color: var(--ber-blue);
}

.brand-line-red {
    background-color: var(--ber-red);
}

.brand-line-gold {
    background-color: var(--ber-gold);
}

/* Custom Hover Effects */
.card:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
}

/* Custom Link Colors */
.top-menu a {
    color: var(--ber-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.top-menu a:hover {
    color: var(--ber-blue);
}

/* Header Layout Container */
.container {
    position: relative;
}

/* Logo and Navigation Container */
.container:has(.logo-img):has(.main-nav) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    background-color: var(--ber-white);
    border-bottom: 1px solid #e5e7eb;
}

/* Logo Styles */
.logo-img {
    flex: 0 0 auto;
    margin-right: 30px;
}

.logo-img figure {
    margin: 0;
    padding: 10px 0;
}

.logo-img img {
    max-height: 48px;
    width: auto;
    display: block;
}

/* Main Navigation Styles */
.main-nav {
    position: relative;
    background-color: transparent;
    border-bottom: none;
    z-index: 1000;
    flex: 1;
}

/* Level 1 Navigation - Hauptmenü */
.level_1 {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

/* Main nav level_1 specific styling when in flex container */
.main-nav .level_1 {
    justify-content: flex-end;
}

.level_1 > li {
    position: relative;
    display: inline-block;
}

/* Level 1 Links */
.level_1 > li > a,
.level_1 > li > strong {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    color: var(--ber-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s ease, background-color 0.3s ease;
    position: relative;
}

.level_1 > li > a:hover,
.level_1 > li > a:focus {
    color: var(--ber-blue);
    background-color: var(--ber-light-blue);
}

/* Active state for main navigation */
.main-nav .level_1 > li.active > strong.active {
    color: var(--ber-blue);
    background-color: var(--ber-light-blue);
    font-weight: 500;
}

/* Submenu indicator for level 1 items */
.level_1 > li.submenu > a::after {
    content: '▼';
    margin-left: 8px;
    font-size: 10px;
    transition: transform 0.3s ease;
}

.level_1 > li.submenu:hover > a::after,
.level_1 > li.submenu:focus-within > a::after {
    transform: rotate(180deg);
}

/* Level 2 Navigation - Dropdown/Submenu */
.level_2 {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--ber-white);
    border: 1px solid #e5e7eb;
    border-top: 3px solid var(--ber-blue);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 999;
    min-width: 250px;
    max-width: 350px;
    border-radius: 0 0 8px 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Show submenu on hover */
.level_1 > li.submenu:hover .level_2,
.level_1 > li.submenu:focus-within .level_2 {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Level 2 List Items */
.level_2 li {
    border-bottom: 1px solid #f3f4f6;
}

.level_2 li:last-child {
    border-bottom: none;
}

/* Level 2 Links */
.level_2 a {
    display: block;
    color: var(--ber-text);
    text-decoration: none;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.5;
    padding: 12px 20px;
    transition: color 0.3s ease, background-color 0.3s ease;
    white-space: nowrap;
}

.level_2 a:hover,
.level_2 a:focus {
    color: var(--ber-blue);
    background-color: var(--ber-light-blue);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container:has(.logo-img):has(.main-nav) {
        padding: 0 15px;
    }
    
    .logo-img {
        margin-right: 20px;
    }
    
    .level_1 > li > a {
        padding: 18px 20px;
        font-size: 15px;
    }
    
    .level_2 {
        min-width: 220px;
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    /* Stack logo and navigation vertically on mobile */
    .container:has(.logo-img):has(.main-nav) {
        flex-direction: column;
        align-items: stretch;
        padding: 0;
    }
    
    .logo-img {
        margin-right: 0;
        margin-bottom: 0;
        text-align: center;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .logo-img figure {
        padding: 15px 0;
    }
    
    .main-nav .level_1 {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
    }
    
    .level_1 > li {
        width: 100%;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .level_1 > li:last-child {
        border-bottom: none;
    }
    
    .level_1 > li > a {
        padding: 16px 20px;
        justify-content: space-between;
    }
    
    .level_2 {
        position: static;
        min-width: auto;
        max-width: none;
        width: 100%;
        border-radius: 0;
        border-top: none;
        border-left: none;
        border-right: none;
        box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
        background-color: #f8f9fa;
    }
    
    .level_2 a {
        padding: 12px 40px;
        font-size: 13px;
    }
    
    /* Mobile menu behavior */
    .level_1 > li.submenu .level_2 {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .level_1 > li > a {
        padding: 14px 16px;
        font-size: 14px;
    }
    
    .level_2 a {
        padding: 10px 32px;
        font-size: 12px;
    }
}

/* Mobile Menu Toggle (if needed) */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        padding: 10px;
        cursor: pointer;
        color: var(--ber-text);
    }
    
    .mobile-menu-toggle:hover {
        color: var(--ber-blue);
    }
}

/* Accessibility Improvements */
.level_1 > li > a:focus {
    outline: 2px solid var(--ber-blue);
    outline-offset: 2px;
}

.level_2 a:focus {
    outline: 2px solid var(--ber-blue);
    outline-offset: 1px;
}

/* Enhanced hover states for better UX */
.level_1 > li.submenu:hover {
    background-color: var(--ber-light-blue);
}

/* Keep submenu open when hovering over it */
.level_2:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Hidden elements for screen readers */
.invisible {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}