/* ===== KOMPETENZEN PAGE STYLES ===== */
/* This file contains all styles needed for the kompetenzen page */

/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #EBEBEB;
}

/* ===== LANGUAGE SWITCHER ===== */
.language-switcher {
    position: fixed;
    left: 14px !important; /* Override responsive.css */
    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;
    z-index: 9997;
}

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

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

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

/* ===== DESKTOP KOMPETENZEN LAYOUT ===== */
.desktop-kompetenzen-layout {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: #EBEBEB;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.kompetenzen-overview-layout {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #EBEBEB;
}

.kompetenzen-overview-layout[hidden] {
    display: none;
}

.kompetenzen-overview-background {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.kompetenzen-overview-background .bg-image {
    position: absolute;
    inset: 0;
    width: 100vw;
    height: 100vh;
    min-width: 100vw;
    min-height: 100vh;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    z-index: 1;
    animation: kompetenzenOverviewBackgroundFadeIn 2.4s ease forwards;
}

@keyframes kompetenzenOverviewBackgroundFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.kompetenzen-overview-background .bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(235, 235, 235, 0.35);
    z-index: 2;
    clip-path: inset(50% 0 50% 0);
    animation: kompetenzenOverviewOverlayExpand 3.2s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

@keyframes kompetenzenOverviewOverlayExpand {
    from {
        clip-path: inset(50% 0 50% 0);
    }

    to {
        clip-path: inset(50% 0 0 0);
    }
}

.kompetenzen-overview-main {
    position: absolute;
    top: 150px;
    left: var(--content-left-margin, 330px);
    right: var(--content-right-margin, 40px);
    z-index: 4;
    display: grid;
    grid-template-columns: 500px 1fr 460px;
    grid-template-areas: "left gap right";
    align-items: flex-end;
}

.kompetenzen-overview-main .left-content {
    grid-area: left;
    width: 500px;
}

.kompetenzen-overview-main .right-content {
    grid-area: right;
    width: 460px;
    justify-self: end;
}

.kompetenzen-overview-main .main-title {
    font-family: 'Roboto', sans-serif;
    font-size: 48px;
    font-weight: 400;
    color: #FFFFFF;
    line-height: 1.1;
    margin: 0;
    max-width: 500px;
}

.kompetenzen-overview-main .main-text {
    color: #FFFFFF;
    font-family: 'Mukta Malar', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 2%;
}

.kompetenzen-overview-main .main-text p {
    margin: 0 0 20px 0;
}

.kompetenzen-overview-main .main-text p:last-child {
    margin-bottom: 0;
}

.kompetenzen-overview-grid-section {
    position: absolute;
    top: 500px;
    left: var(--content-left-margin, 330px);
    right: var(--content-right-margin, 40px);
    z-index: 4;
}

.kompetenzen-overview-grid-section .competency-grid {
    display: grid;
    grid-template-columns: repeat(3, 280px);
    grid-template-rows: repeat(2, 1fr);
    gap: 48px;
    row-gap: 48px;
    width: 100%;
    max-width: 1300px;
    justify-content: space-between;
}

.kompetenzen-overview-grid-section .competency-item {
    display: flex;
    align-items: center;
    gap: 24px;
    width: 240px;
    position: relative;
}

.kompetenzen-overview-grid-section .competency-icon {
    width: 40px;
    height: 40px;
    background: transparent;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.kompetenzen-overview-grid-section .competency-icon::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.8);
    transition: height 0.65s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s ease;
}

.kompetenzen-overview-grid-section .competency-icon img {
    width: 24px;
    height: 24px;
    position: relative;
    z-index: 1;
    transition: filter 0.3s ease;
}

.kompetenzen-overview-grid-section .competency-item:nth-child(4) .competency-icon img {
    width: 28px !important;
    height: 28px !important;
}

.kompetenzen-overview-grid-section .icon-grey {
    filter: none;
}

.kompetenzen-overview-grid-section .competency-label {
    color: #FFFFFF;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 2%;
    transition: font-weight 0.2s ease;
    white-space: nowrap;
}

.kompetenzen-overview-grid-section .competency-link-overlay {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 24px;
    width: 100%;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.kompetenzen-overview-grid-section .competency-item:hover .competency-label {
    font-weight: 700;
    color: #FFFFFF;
}

.kompetenzen-overview-grid-section .competency-item:hover .competency-icon {
    background: transparent;
}

.kompetenzen-overview-grid-section .competency-item:hover .competency-icon::before {
    height: 100%;
    background: rgba(255, 255, 255, 1);
}

.kompetenzen-overview-grid-section .competency-item:hover .competency-icon img {
    filter: brightness(0) saturate(0%) invert(0.56);
}

.kompetenzen-overview-grid-section .competency-item::before {
    content: none;
}

.kompetenzen-overview-grid-section .competency-item:hover::before {
    width: 0;
}

.kompetenzen-overview-grid-section .competency-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 40px;
    width: calc(100% - 40px);
    height: 1px;
    background: rgba(255, 255, 255, 0.8);
    transform-origin: left center;
    transition: opacity 0.3s ease;
}

.kompetenzen-overview-grid-section .competency-item:hover::after {
    opacity: 1;
}

body.kompetenzen-overview-active .desktop-kompetenzen-layout,
body.kompetenzen-overview-active .mobile-kompetenzen-content,
body.kompetenzen-overview-active #mobile-kompetenzen-header-container {
    display: none !important;
}

/* ===== MOBILE KOMPETENZEN HEADER ===== */
.mobile-kompetenzen-header {
    display: none; /* Hidden by default, shown on mobile */
}

/* ===== MOBILE KOMPETENZEN CONTENT ===== */
.mobile-kompetenzen-content {
    display: none; /* Hidden by default, shown on mobile */
}

/* ===== MOBILE BREAKPOINT ===== */
@media (max-width: 480px) {
    /* Hide desktop layout */
    .desktop-kompetenzen-layout {
        display: none !important;
    }
    
    /* Hide regular header and navigation on mobile kompetenzen page */
    .sticky-header {
        display: none !important;
    }
    
    .left-sidebar {
        display: none !important;
    }
    
    /* Show mobile header */
    .mobile-kompetenzen-header {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 30vh; /* Match the background height */
        background: #EBEBEB;
        z-index: 10000; /* Higher z-index than regular header */
        /* Debug: ensure visibility */
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* Mobile background */
    .mobile-background {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
        z-index: 0;
    }
    
    /* Mobile header content container */
    .mobile-header-content {
        position: relative;
        padding: 14px;
        display: flex;
        flex-direction: column;
        gap: 20px; /* Increased from 12px to 20px (8px more) */
        z-index: 1000;
    }

    /* Top row container */
    .mobile-header-top-row {
        display: flex !important; /* Ensure this overrides any conflicting styles */
        justify-content: space-between;
        align-items: center;
        width: 100%;
        min-height: 24px; /* Ensure consistent height for proper centering */
        position: relative; /* Ensure proper positioning context */
    }

    /* Mobile back button container */
    .mobile-back-button-container {
        display: flex;
        align-items: center;
        height: 100%; /* Take full height of parent for proper centering */
    }

    .mobile-back-button {
        color: #FFFFFF !important; /* Override responsive.css */
        text-decoration: none;
        font-family: 'Roboto', sans-serif;
        font-size: 16px;
        font-weight: 700;
        padding: 0px;
        line-height: 1; /* Reset line-height to prevent vertical spacing issues */
        display: flex;
        align-items: center; /* Ensure text is centered within the button */
        position: static !important; /* Override responsive.css fixed positioning */
        top: auto !important; /* Override responsive.css */
        left: auto !important; /* Override responsive.css */
        z-index: auto !important; /* Override responsive.css */
        background: none !important; /* Override responsive.css */
        border: none !important; /* Override responsive.css */
        cursor: pointer;
    }

    .mobile-back-button:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .mobile-kompetenzen-header .mobile-current-section-title {
        display: flex;
        color: #FFFFFF !important;
        font-family: 'Inter', sans-serif;
        font-size: 16px;
        font-weight: 700 !important;
        line-height: 1;
    }
    
    /* Kompetenzen text - leftmost element */
    .mobile-kompetenzen-back {
        color: #FFFFFF;
        text-decoration: none;
        font-family: 'Roboto', sans-serif;
        font-size: 16px;
        font-weight: 400;
        line-height: 1.171875em;
        letter-spacing: 2%;
        text-align: center;
        writing-mode: vertical-rl;
        text-orientation: mixed;
        transform: rotate(180deg);
        transition: opacity 0.3s ease;
        width: 19px;
        height: auto;
        flex-shrink: 0;
        align-self: start;
        padding: 0;
    }
    
    .mobile-kompetenzen-back:hover {
        opacity: 0.8;
    }

    /* Indicator element - middle element */
    .mobile-indicator {
        --sub-nav-indicator-top: 8px;
        --sub-nav-indicator-height: 17px;
        --sub-nav-line-top: 27px;
        --sub-nav-line-height: calc(100% - 27px);
        width: 5px;
        height: 100%;
        display: flex;
        flex-direction: column;
        position: relative;
        transition: transform 0.3s ease;
        flex-shrink: 0;
        align-self: stretch;
        padding: 6px 0;
    }
    
    .mobile-indicator-rectangle {
        width: 4px;
        height: var(--sub-nav-indicator-height);
        background: #FFFFFF;
        margin-left: 1px;
        position: absolute;
        top: var(--sub-nav-indicator-top);
        transition: top 0.35s ease, height 0.35s ease;
    }
    
    .mobile-indicator-line {
        width: 1px;
        height: var(--sub-nav-line-height);
        background: #FFFFFF;
        margin: 0;
        position: absolute;
        top: var(--sub-nav-line-top);
        left: 0;
        transition: top 0.35s ease, height 0.35s ease;
    }
    
    /* Mobile logo container */
    .mobile-logo-container {
        display: flex !important; /* Ensure this overrides any conflicting styles */
        align-items: center;
        height: 100%; /* Take full height of parent for proper centering */
    }
    
    .mobile-logo {
        height: 20px;
        width: auto;
        filter: brightness(0) invert(1); /* Make logo white */
        display: block; /* Ensure proper image display */
    }

    .mobile-logo-link {
        display: block;
        text-decoration: none;
    }
    
    .mobile-bg-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .mobile-bg-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0);
        z-index: 2;
    }
    
    /* Mobile sub-nav */
    .mobile-sub-nav-container {
        position: relative;
        z-index: 10;
        padding: 0px;
        display: block;
        width: 100%;
    }

    .mobile-kompetenzen-back {
        position: absolute;
        top: 0;
        left: 0;
        z-index: 2;
    }

    .mobile-sub-nav-menu {
        display: grid;
        grid-template-columns: 24px 12px 5px 10px max-content;
        align-items: start;
        width: fit-content;
        max-width: 100%;
        margin-inline: auto;
    }

    .mobile-indicator {
        grid-column: 3;
        grid-row: 1;
        align-self: stretch;
    }

    /* Sub-nav links container */
    .mobile-sub-nav-links {
        display: flex !important;
        flex-direction: column !important;
        grid-column: 1 / 6;
        grid-row: 1;
        gap: 2px;
        flex: 1;
        width: max-content;
        /* Ensure vertical stacking and override parent flexbox */
        align-items: stretch;
        flex-wrap: nowrap;
        /* Reset any inherited flexbox properties */
        align-self: stretch;
    }
    
    /* Sub-nav items */
    .mobile-sub-nav-row-link {
        display: block !important;
        text-decoration: none;
        color: inherit;
        transition: all 0.3s ease;
        cursor: pointer;
        padding: 0px;
        width: max-content;
        flex-shrink: 0;
        /* Debug: ensure each item takes full width */
        box-sizing: border-box;
    }
    
    .mobile-sub-nav-row-link:hover {
        opacity: 0.8;
    }
    
    .mobile-sub-nav-item-container {
        display: grid !important;
        grid-template-columns: 24px 12px 5px 10px max-content;
        align-items: center;
        min-height: 24px;
        width: max-content;
    }
    
    .mobile-sub-nav-item {
        grid-column: 1;
        font-family: 'Roboto', sans-serif;
        font-weight: 400;
        font-size: 16px;
        color: #FFFFFF;
        opacity: 0.6;
    }
    
    .mobile-sub-nav-title {
        grid-column: 5;
        font-family: 'Roboto', sans-serif;
        font-weight: 400;
        font-size: 16px;
        color: #FFFFFF;
        opacity: 0.8;
        white-space: nowrap;
    }
    
    /* Active state */
    .mobile-sub-nav-row-link.active .mobile-sub-nav-title {
        color: #FFFFFF;
        opacity: 1;
        font-weight: 700;
    }
    
    .mobile-sub-nav-row-link.active .mobile-sub-nav-item {
        color: #FFFFFF;
        opacity: 1;
        font-weight: 700;
    }
    
    /* Show mobile content */
    .mobile-kompetenzen-content {
        display: flex !important;
        flex-direction: column !important;
        padding: 20px 5%;
        margin-top: 30vh; /* Add top margin to account for sticky header */
        background: #EBEBEB;
        flex: 1; /* Take up remaining space */
    }
    
    /* Mobile content styles */
    .mobile-content-header {
        margin-bottom: 20px;
    }
    
    .mobile-header-title {
        font-family: 'Roboto', sans-serif;
        font-weight: 700;
        font-size: 24px;
        line-height: 1.2;
        letter-spacing: 2%;
        color: #6A6A6A;
        margin: 0;
    }
    
    .mobile-content {
        margin-bottom: 12px;
    }
    
    .mobile-text-paragraph {
        font-family: 'Roboto', sans-serif;
        font-weight: 400;
        font-size: 16px;
        line-height: 1.4;
        letter-spacing: 2%;
        color: #6A6A6A;
        margin: 0;
    }
    
    .mobile-next-button {
        margin-top: 12px;
    }
    
    .mobile-next-link {
        position: relative;
        z-index: 4;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-height: 34px;
        padding: 3px 6px 3px 0;
        text-decoration: none;
        color: inherit;
        transition: all 0.3s ease;
        pointer-events: auto;
    }
    
    .mobile-next-link:hover {
        opacity: 0.8;
    }
    
    .mobile-next-text {
        font-family: 'Roboto', sans-serif;
        font-weight: 400;
        font-size: 16px;
        line-height: 1.4;
        letter-spacing: 2%;
        color: #6A6A6A;
        pointer-events: none;
    }
    
    .mobile-next-arrow {
        width: 20px;
        height: 10px;
        stroke: #6A6A6A;
        fill: none;
        pointer-events: none;
    }
    
    /* Body adjustments for mobile */
    body {
        overflow: auto !important;
        height: auto !important;
        min-height: 100vh !important;
        display: flex !important;
        flex-direction: column !important;
    }
}

/* ===== TEMPLATE BACKGROUND STYLES ===== */
.template-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 40vw; /* Changed from 100vw to 40vw - covers only 40% of left side */
    height: 100vh;
    z-index: 1;
    overflow: hidden; /* Prevent background overflow */
}



.template-background .bg-image {
    width: 100%; /* Changed from 100vw to 100% to fit the container */
    height: 100vh;
    object-fit: cover;
    opacity: 1; /* Changed from 0.9 to 1 for full opacity */
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; /* Changed from 100vw to 100% to fit the container */
    height: 100vh;
    background: rgba(0, 0, 0, 0); /* Changed from 0.4 to 0 for no overlay */
    z-index: 2;
}

/* Ensure background doesn't cover fixed elements */
.template-background,
.template-background .bg-image,
.bg-overlay {
    pointer-events: none;
}

/* ===== SUB-NAVIGATION CONTAINER STYLES ===== */
.sub-nav-container {
    --sub-nav-indicator-top: 0px;
    --sub-nav-indicator-height: 28px;
    --sub-nav-line-top: 28px;
    --sub-nav-line-height: calc(100% - 28px);
    position: absolute;
    top: 160px;
    left: calc(40px + 20vw);
    transform: translateX(-50%);
    width: 260px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100; /* Keep this - it's what fixed the click issue */
}

.sub-nav-indicator {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 36px;
    width: 5px;
    pointer-events: none;
    z-index: 100;
}

.sub-nav-indicator-rectangle {
    position: absolute;
    top: var(--sub-nav-indicator-top);
    left: 1px;
    width: 4px;
    height: var(--sub-nav-indicator-height);
    background: #FFFFFF;
    transition: top 0.35s ease, height 0.35s ease;
}

.sub-nav-indicator-line {
    position: absolute;
    top: var(--sub-nav-line-top);
    left: 0;
    width: 1px;
    height: var(--sub-nav-line-height);
    background: #FFFFFF;
    transition: top 0.35s ease, height 0.35s ease;
}

/* ===== DESKTOP RESPONSIVE BREAKPOINTS ===== */

/* Large Desktop (≥1440px) */
@media (min-width: 1440px) {
    .desktop-kompetenzen-layout .sub-nav-container {
        left: calc(40px + 20vw);
    }
}

/* Medium Desktop (1025px-1440px) */
@media (max-width: 1439px) and (min-width: 1025px) {
    .desktop-kompetenzen-layout .sub-nav-container {
        left: calc(40px + 20vw);
    }
}

/* Desktop (769px-1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .desktop-kompetenzen-layout .sub-nav-container {
        left: calc(40px + 20vw);
    }
}

/* Tablet (481px-768px) */
@media (max-width: 768px) and (min-width: 481px) {
    .desktop-kompetenzen-layout .sub-nav-container {
        left: 4%;
        top: 90px;
        transform: none;
    }
    
    /* Reduce active font size to match inactive size on tablet */
    .desktop-kompetenzen-layout .sub-nav-row-link.active .sub-nav-item,
    .desktop-kompetenzen-layout .sub-nav-row-link.active .sub-nav-title {
        font-size: 16px;
    }
}



/* ===== SUB-NAVIGATION ROW LINK STYLES ===== */
.sub-nav-row-link {
    display: block;
    width: 100%;
    height: 28px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
    cursor: pointer;
    pointer-events: auto; /* Keep this - it's what fixed the click issue */
    position: relative; /* Keep this - it's what fixed the click issue */
    z-index: 101; /* Keep this - it's what fixed the click issue */
}

.sub-nav-row-link:hover {
    opacity: 0.8;
}

.sub-nav-row-link.active .sub-nav-item {
    opacity: 1;
}

.sub-nav-row-link.active .sub-nav-title {
    opacity: 1;
    font-weight: 500;
}

/* ===== SUB-NAVIGATION ITEM CONTAINER STYLES ===== */
.sub-nav-item-container {
    display: grid;
    grid-template-columns: 24px 12px 5px 10px minmax(0, 1fr);
    align-items: center;
    height: 28px;
}

.sub-nav-item {
    grid-column: 1;
    width: 24px;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: 2%;
    color: #FFFFFF;
    opacity: 0.6;
    text-align: center;
    transition: opacity 0.3s ease, font-weight 0.3s ease;
}

.sub-nav-title {
    grid-column: 5;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: 2%;
    color: #FFFFFF;
    opacity: 0.6;
    transition: opacity 0.3s ease, font-weight 0.3s ease;
    white-space: nowrap;
}

/* ===== TEMPLATE CONTENT STYLES ===== */
.template-content {
    position: relative;
    z-index: 3;
    padding: 0;
    height: auto;
    width: 100%;
    overflow: visible;
    min-height: auto;
}

/* ===== CONTENT CONTAINER STYLES ===== */
.content-container {
    position: absolute;
    top: 155px;
    left: calc(45% + 50px);
    width: calc(55% - 70px);
    max-width: 700px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    min-height: auto;
    justify-content: flex-start;
    overflow-y: auto;
}



/* ===== CONTENT HEADER STYLES ===== */
.content-header {
    margin-bottom: 40px; /* Reduced from 60px to allow more flexibility */
    width: 100%;
    min-height: 76px; /* Changed from fixed height to min-height for flexibility */
}

.header-title {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 32px;
    line-height: 1.2;
    letter-spacing: 2%;
    color: #6A6A6A; /* Changed from #FFFFFF to duller grey */
    margin: 0;
    width: 100%;
}

/* ===== CONTENT GRID STYLES ===== */
.content-grid {
    display: flex; /* Changed to flex to work with the new layout */
    flex-direction: column;
    width: 100%;
    z-index: 3;
    flex: none; /* Changed from flex: 1 to flex: none to not expand */
    overflow: visible; /* Changed from hidden to visible */

}

/* ===== RIGHT COLUMN - MAIN TEXT STYLES ===== */
.right-column {
    width: 100%; /* Take full width since there's no left column */
    max-width: 700px; /* Ensure content doesn't exceed right margin */
}

.main-text-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
    width: 100%;
    max-width: 700px;
}

.text-paragraph {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: 2%;
    color: #6A6A6A; /* Changed from #FFFFFF to duller grey */
    margin: 0;
    width: 100%;
}

/* ===== NEXT BUTTON STYLES ===== */
.next-button {
    position: relative; /* Changed from absolute to relative since it's now in content container */
    margin-top: 24px; /* Add space above the button */
    display: flex;
    align-items: center;
    gap: 12px; /* Reduced gap from 10px to 5px to bring text and arrow closer */
    cursor: pointer;
    transition: all 0.3s ease; /* Single transition for all properties */
    z-index: 3;
    align-self: flex-start; /* Align button to the left side of the container */
    margin-left: 0; /* Remove auto margin to align to left */
    flex-shrink: 0; /* Prevent button from shrinking */

}

.next-link {
    position: relative;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 3px 6px 3px 0;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.next-link:hover {
    opacity: 0.8;
}

.next-link:hover .next-text {
    font-weight: 700; /* Make text bold on hover */
}

.next-text {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: 2%;
    color: #6A6A6A; /* Changed from #FFFFFF to duller grey */
    pointer-events: none;
}

.next-arrow {
    width: 20px;
    height: 10px;
    stroke: #6A6A6A !important; /* Changed from #FFFFFF to duller grey */
    fill: none;
    pointer-events: none;
}

/* Ensure SVG path is duller grey */
.next-arrow path {
    stroke: #6A6A6A !important; /* Changed from #FFFFFF to duller grey */
    fill: none;
}

/* Footer styles moved to components.css to avoid conflicts */

/* ===== KOMPETENZEN PAGE FOOTER OVERRIDES ===== */
/* Desktop: Language switcher should be white on kompetenzen page due to dark background */
.footer-language-switcher {
    color: #FFFFFF !important; /* White text for visibility on dark background */
}

.footer-language-switcher .lang-active,
.footer-language-switcher .lang-separator,
.footer-language-switcher .lang-option {
    color: #FFFFFF !important; /* Ensure all language switcher elements are white */
}

.bottom-tagline {
    color: #AFAFAF !important;
}

/* ===== MOBILE KOMPETENZEN PAGE FOOTER OVERRIDES ===== */
/* Mobile: Language switcher needs duller grey on mobile kompetenzen page */
@media (max-width: 480px) {
    .footer-language-switcher {
        color: #6A6A6A !important; /* Duller grey for mobile kompetenzen page */
    }
    
    .footer-language-switcher .lang-active,
    .footer-language-switcher .lang-separator,
    .footer-language-switcher .lang-option {
        color: #6A6A6A !important; /* Duller grey for mobile kompetenzen page */
    }
    
    .bottom-tagline {
        color: #6A6A6A !important; /* Duller grey for mobile kompetenzen page */
    }
}

/* ===== RESPONSIVE STABILIZATION OVERRIDES ===== */
body.template-main {
    --desktop-subpage-nav-top: 160px;
    --desktop-subpage-subnav-width: 260px;
    --desktop-subpage-subnav-left: clamp(128px, calc(40px + 20vw - 130px), 260px);
    --desktop-subpage-content-left: max(
        calc(var(--desktop-subpage-subnav-left) + var(--desktop-subpage-subnav-width) + 48px),
        calc(45% + 50px)
    );
    --desktop-subpage-content-right: 40px;
    --desktop-subpage-content-width: calc(100vw - var(--desktop-subpage-content-left) - var(--desktop-subpage-content-right));
}

@media (min-width: 481px) {
    .desktop-kompetenzen-layout .sub-nav-container {
        top: var(--desktop-subpage-nav-top);
        left: var(--desktop-subpage-subnav-left);
        width: var(--desktop-subpage-subnav-width);
        transform: none;
    }

    .desktop-kompetenzen-layout .content-container {
        left: var(--desktop-subpage-content-left);
        width: var(--desktop-subpage-content-width);
        max-width: min(700px, var(--desktop-subpage-content-width));
    }
}

@media (max-width: 1280px) and (min-width: 769px) {
    body.template-main {
        --desktop-subpage-subnav-left: clamp(116px, calc(40px + 20vw - 130px), 188px);
        --desktop-subpage-content-left: max(
            calc(var(--desktop-subpage-subnav-left) + var(--desktop-subpage-subnav-width) + 40px),
            calc(45% + 32px)
        );
    }
}

@media (max-width: 768px) and (min-width: 481px) {
    body.template-main {
        --desktop-subpage-subnav-left: 4%;
        --desktop-subpage-content-left: 42%;
        --desktop-subpage-content-right: 24px;
    }
}
