/* ===== SHARED COMPONENT STYLES ===== */
/* This file contains styles for reusable components: header, navigation, footer */

html.is-page-transitioning,
body.is-page-transitioning {
    background: #EBEBEB !important;
}

body.is-page-transitioning::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    background: #EBEBEB;
    pointer-events: none;
}

:root {
    --left-nav-axis-x: calc(100px + (39.6px / 2));
    --left-nav-text-width: 19px;
    --left-nav-text-gap: 8px;
    --desktop-footer-content-bottom: 12px;
}

/* ===== HEADER STYLES ===== */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 80px;
    z-index: 10001;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 40px 30px 100px;
    box-sizing: border-box;
    min-width: 100vw;
    overflow: visible;
    background: transparent;
    border: none;
    outline: none;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.3s ease, pointer-events 0.3s ease;
}

.header-logo-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    z-index: 10002;
}

.header-logo {
    height: 29.7px;
    width: 39.6px;
    filter: brightness(0) saturate(100%) invert(1) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(1) contrast(1);
}

.header-logo-right {
    display: flex;
    align-items: center;
    margin-right: 0;
    padding-right: 0;
    flex-shrink: 0;
    position: relative;
    z-index: 10002;
}

.header-logotype {
    height: 29.7px;
    width: auto;
    filter: brightness(0) saturate(100%) invert(42%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(0.42) contrast(1); /* Changed to duller grey */
    max-width: none;
    overflow: visible;
    flex-shrink: 0;
}

/* ===== HEADER LOGO LINK STYLES ===== */
.header-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: opacity 0.3s ease;
    pointer-events: auto;
    position: relative;
    z-index: 10003;
}

.header-logo-link:hover {
    opacity: 0.8;
}

/* ===== NAVIGATION STYLES ===== */
.left-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 80px;
    height: 100vh;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.3s ease;
    transform: translateZ(0);
    will-change: opacity;
}

@media (max-width: 480px) {
    body.template-main #nav-container,
    body.template-main .left-sidebar {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
}

/* Navigation Component */
.navigation-component {
    position: absolute;
    left: var(--left-nav-axis-x);
    top: 164.5px;
    display: flex;
    align-items: center;
    gap: var(--left-nav-text-gap);
    width: auto;
    height: auto;
    transform: translateX(calc(-1 * (var(--left-nav-text-width) + var(--left-nav-text-gap) + 0.5px)));
}

/* Frame 308: Navigation Text Items */
.nav-text-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 102px;
    width: var(--left-nav-text-width);
    align-items: center;
    position: relative;
}

.nav-item {
    color: #FFFFFF; /* Changed back to white for better visibility on sub-pages */
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 400;
    text-align: left;
    letter-spacing: 2%;
    line-height: 1.171875em;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    white-space: nowrap;
    display: block;
    transition: color 0.3s ease;
}

.nav-item.active {
    color: #FFFFFF; /* Changed back to white for better visibility on sub-pages */
    font-weight: 700;
    text-align: center;
}

.nav-item:hover {
    color: #CCCCCC; /* Lighter grey on hover instead of darker */
}

/* Frame 309: Visual Indicators */
.nav-indicators-frame {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    align-self: stretch;
    flex: 0 0 1px;
    width: 1px;
    height: auto;
}

/* Frame 310: Active indicator */
.nav-indicator {
    position: absolute;
    top: 0;
    right: 1px;
    display: block;
    gap: 0;
    padding: 0;
}

.indicator-line {
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 110px;
    background: #FFFFFF; /* Changed back to white for better visibility on sub-pages */
    border-radius: 0;
    transition: transform 0.3s ease, height 0.3s ease;
    z-index: 2;
}

/* Vertical line separator */
.nav-separator {
    position: absolute;
    left: 0;
    right: auto;
    transform: none;
    top: 0;
    width: 1px;
    height: 100%;
    background: #FFFFFF; /* Changed back to white for better visibility on sub-pages */
    margin: 0;
    transition: height 0.3s ease;
    z-index: 1;
}

.language-switcher {
    position: absolute;
    bottom: 30px;
    left: var(--left-nav-axis-x);
    transform: translateX(-50%);
    color: #FFFFFF; /* Changed back to white for better visibility on sub-pages */
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 2%;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10000;
}

.lang-active {
    color: inherit;
    font-weight: 700;
}

.lang-separator {
    margin: 0;
    color: inherit;
}

.lang-option {
    color: inherit;
    cursor: pointer;
}

/* ===== FOOTER STYLES ===== */
.main-footer {
    position: fixed; /* Fixed for consistent mobile behavior */
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    z-index: 9998;
    padding: 0 40px 0 40px;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between; /* Restored original layout */
    gap: 20px;
    min-height: 24px; /* Ensure consistent height for alignment */
}

/* Force perfect vertical alignment for footer elements */
.main-footer > * {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    height: 24px;
    line-height: 1;
}

/* ===== MOBILE FOOTER OVERRIDE ===== */
@media (max-width: 480px) {
    /* Scope mobile footer override to subpages only */
    .template-main .main-footer {
        position: relative !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        width: calc(100% - 28px) !important;
        margin: 14px 14px 14px !important;
        padding: 0 !important;
        z-index: 2 !important;
        display: flex !important;
        align-items: center !important; /* Simple center alignment */
        justify-content: space-between !important;
        gap: 14px !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .template-main .main-footer > * {
        height: auto !important;
        line-height: 1.2 !important;
    }

    .template-main .main-footer .footer-language-switcher,
    .template-main .main-footer .bottom-tagline {
        position: static !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        width: auto !important;
        height: auto !important;
        transform: none !important;
        z-index: auto !important;
    }
    
    /* Ensure footer container is visible (subpages only) */
    .template-main #footer-container {
        display: block !important;
        visibility: visible !important;
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .template-main .mobile-kompetenzen-content,
    .template-main .mobile-services-content {
        padding-bottom: 20px !important;
    }
    
    /* Mobile footer elements - simplified alignment */
    .template-main .main-footer .bottom-tagline {
        font-size: 14px !important;
        line-height: 1.2 !important;
        margin: 0 !important;
        padding: 0 !important;
        letter-spacing: 3px !important;
        white-space: nowrap !important;
        color: #6A6A6A !important; /* Ensure consistent color */
    }
    
    .template-main .main-footer .footer-language-switcher {
        font-size: 14px !important;
        line-height: 1.2 !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        margin: 0 !important;
        padding: 0 !important;
        color: #6A6A6A !important; /* Ensure consistent color */
    }
    

}

.bottom-tagline {
    color: #6A6A6A;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 14px;
    font-weight: 400;
    font-style: italic;
    text-transform: none;
    letter-spacing: 22.5%;
    margin: 0;
    line-height: 1.2;
    height: 24px; /* Ensure consistent height for alignment */
    display: flex;
    align-items: center;
}

@media (min-width: 481px) {
    .bottom-tagline {
        position: fixed;
        right: var(--content-right-margin, 40px);
        bottom: var(--desktop-footer-content-bottom);
        font-size: 14px;
        width: 197px;
        justify-content: flex-end;
        z-index: 9997;
    }
}

/* Footer language switcher styles */
.footer-language-switcher {
    margin: 0;
    position: fixed;
    left: var(--left-nav-axis-x);
    bottom: var(--desktop-footer-content-bottom);
    transform: translateX(-50%);
    color: #6A6A6A;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 2%;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.2;
    height: 24px; /* Ensure consistent height for alignment */
}

/* Ensure language switcher elements are perfectly aligned */
.footer-language-switcher .lang-active,
.footer-language-switcher .lang-separator,
.footer-language-switcher .lang-option {
    display: inline-flex;
    align-items: center;
    height: 100%;
    line-height: 1;
    vertical-align: middle;
}

@media (min-width: 481px) {
    body.template-main .main-footer {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        display: flex;
        width: 100%;
        padding: 0 40px 0;
        align-items: center;
        justify-content: space-between;
        pointer-events: auto;
    }

    body.template-main .main-footer .footer-language-switcher {
        position: fixed;
        left: var(--left-nav-axis-x);
        bottom: var(--desktop-footer-content-bottom);
        width: auto;
        transform: translateX(-50%);
    }

    body.template-main .main-footer .bottom-tagline {
        position: fixed;
        right: var(--content-right-margin, 40px);
        bottom: var(--desktop-footer-content-bottom);
        left: auto;
        width: auto;
        transform: none;
    }
}

/* ===== VERSION SWITCHER STYLES ===== */
.version-switcher {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    padding: 10px;
    backdrop-filter: blur(10px);
}

.version-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.version-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.version-btn:active {
    transform: translateY(0);
}
