/**
 * KI-Förderung Sliders v2.1
 * Clean, Light Aesthetic - Matches Target Design
 */

/* =========================================
   CSS Custom Properties
   ========================================= */
:root {
    /* Brand Colors */
    --ki-primary: #102f82;
    --ki-primary-rgb: 10, 31, 68;
    --ki-accent: #1e3a8a;
    --ki-accent-light: #2563eb;
    --ki-accent-rgb: 30, 58, 138;
    
    /* Backgrounds */
    --ki-bg-light: #e8eef5;
    --ki-bg-white: #ffffff;
    --ki-bg-slide1: linear-gradient(180deg, #e8eef5 0%, #dce5f0 100%);
    --ki-bg-slide2: #ffffff;
    
    /* Text */
    --ki-text-dark: #0a1f44;
    --ki-text-body: #374151;
    --ki-text-muted: #6b7280;
    
    a.ki-btn.ki-btn--primary {
        color: white!important;
    }
    a.kifs-cta-button {
        color: white;
    }

    /* Effects */
    --ki-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --ki-shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
    --ki-shadow-card: 0 25px 50px -12px rgba(0, 0, 0, 0.12);
    
    /* Transitions */
    --ki-transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --ki-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --ki-transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Typography */
    --ki-font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --ki-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    
    /* Spacing */
    --ki-slider-height: 600px;
    --ki-slider-min-height: 500px;
}

/* =========================================
   Slider Wrapper - Full Width
   ========================================= */
.ki-slider-wrapper {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
}

/* Salient/Theme Compatibility */
.wpb_row .ki-slider-wrapper,
.vc_row .ki-slider-wrapper,
.container-wrap .ki-slider-wrapper,
#ajax-content-wrap .ki-slider-wrapper,
.main-content .ki-slider-wrapper {
    max-width: none !important;
    padding: 0 !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    width: 100vw !important;
    left: 50% !important;
    position: relative !important;
}

/* =========================================
   Main Slider
   ========================================= */
.ki-slider {
    width: 100%;
    height: var(--ki-slider-height);
    min-height: var(--ki-slider-min-height);
    overflow: hidden;
}

.ki-slider .swiper-wrapper {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   Individual Slides
   ========================================= */
.ki-slide {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Slide 1 - Hero (Light gradient background) */
.ki-slide--hero {
    background: var(--ki-bg-slide1);
}

/* Slide 2 - Funding (White background) */
.ki-slide--funding {
    background: var(--ki-bg-slide2);
}

/* =========================================
   Slide Container & Content
   ========================================= */
.ki-slide__container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

/* Hero slide - centered single column */
.ki-slide--hero .ki-slide__container {
    grid-template-columns: 1fr;
    text-align: center;
    max-width: 900px;
}

.ki-slide__content {
    position: relative;
}

/* Hide decorative backgrounds for clean look */
.ki-slide__bg {
    display: none;
}

/* =========================================
   Badge
   ========================================= */
.ki-slide__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--ki-bg-white);
    border: 1px solid #d1d5db;
    border-radius: 100px;
    padding: 10px 20px;
    font-family: var(--ki-font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--ki-text-dark);
    margin-bottom: 24px;
    box-shadow: var(--ki-shadow);
}

.ki-slide--hero .ki-slide__badge {
    justify-content: center;
}

/* Funding slide badge - accent style */
.ki-slide--funding .ki-slide__badge {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    color: var(--ki-accent);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ki-slide__badge-icon {
    display: none;
}

.ki-slide--funding .ki-slide__badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--ki-accent);
    border-radius: 50%;
    margin-right: 8px;
}

/* =========================================
   Title
   ========================================= */
.ki-slide__title {
    font-family: var(--ki-font-display);
    font-size: clamp(32px, 4.5vw, 52px);
    font-weight: 800;
    line-height: 1.15;
    color: var(--ki-text-dark);
    margin: 0 0 20px 0;
    letter-spacing: -0.02em;
}

.ki-slide--hero .ki-slide__title {
    font-size: clamp(36px, 5vw, 58px);
}

.ki-highlight {
    color: var(--ki-accent-light);
}

/* =========================================
   Description
   ========================================= */
.ki-slide__description {
    font-family: var(--ki-font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--ki-text-muted);
    margin: 0 0 32px 0;
    max-width: 500px;
}

.ki-slide--hero .ki-slide__description {
    margin-left: auto;
    margin-right: auto;
    max-width: 700px;
    font-size: 18px;
}

/* =========================================
   CTA Buttons
   ========================================= */
.ki-slide__ctas {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.ki-slide--hero .ki-slide__ctas {
    justify-content: center;
}

.ki-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-family: var(--ki-font-body);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--ki-transition);
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
    overflow: visible;
}

.ki-btn--primary {
    background: var(--ki-primary);
    color: #ffffff;
    border-color: var(--ki-primary);
}

.ki-btn--primary:hover {
    background: #1a365d;
    border-color: #1a365d;
    box-shadow: 0 4px 12px rgba(10, 31, 68, 0.3);
}

.ki-btn--outline {
    background: var(--ki-bg-white);
    color: var(--ki-text-dark);
    border-color: #d1d5db;
}

.ki-btn--outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.ki-btn__icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform var(--ki-transition-fast);
}

.ki-btn:hover .ki-btn__icon {
    transform: translateX(3px);
}

/* =========================================
   Funding Slide - Image Section
   ========================================= */
.ki-slide__visual {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Actual uploaded image */
.ki-funding-card__image {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
}

/* Default image when no upload */
.ki-funding-card {
    position: relative;
    width: 100%;
    max-width: 480px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--ki-shadow-card);
    background: url('https://tectum.group/ai/wp-content/uploads/2026/01/tectum-ai.webp') center/cover no-repeat;
    min-height: 320px;
}

/* 100% Badge overlay on image */
.ki-funding-card__badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: var(--ki-primary);
    color: #ffffff;
    padding: 16px 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--ki-shadow-lg);
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    z-index: 2;
}

.ki-funding-card__badge::before {
    content: 'Bis zu';
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    opacity: 0.9;
    margin-bottom: 2px;
}

.ki-funding-card__badge::after {
    content: '100% Förderung';
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
}

/* =========================================
   Navigation Buttons
   ========================================= */
.ki-slider__nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    transform: translateY(-50%);
}

.ki-slider__nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--ki-bg-white);
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    color: var(--ki-text-dark);
    cursor: pointer;
    transition: var(--ki-transition);
    pointer-events: auto;
    box-shadow: var(--ki-shadow);
}

.ki-slider__nav-btn:hover {
    background: var(--ki-primary);
    color: #ffffff;
    border-color: var(--ki-primary);
    transform: scale(1.05);
}

.ki-slider__nav-btn:active {
    transform: scale(0.95);
}

.ki-slider__nav-btn svg {
    width: 20px;
    height: 20px;
}

.ki-slider__nav-btn.swiper-button-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ki-slider__nav-btn.swiper-button-disabled:hover {
    background: var(--ki-bg-white);
    color: var(--ki-text-dark);
    border-color: #e5e7eb;
    transform: none;
}

/* =========================================
   Pagination
   ========================================= */
.ki-slider__pagination {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 10px;
}

.ki-slider__pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #d1d5db;
    border-radius: 50%;
    opacity: 1;
    transition: var(--ki-transition);
    cursor: pointer;
}

.ki-slider__pagination .swiper-pagination-bullet:hover {
    background: #9ca3af;
}

.ki-slider__pagination .swiper-pagination-bullet-active {
    background: var(--ki-accent);
    width: 28px;
    border-radius: 5px;
}

/* =========================================
   Progress Bar
   ========================================= */
.ki-slider__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.05);
    z-index: 10;
}

.ki-slider__progress-bar {
    height: 100%;
    width: 0;
    background: var(--ki-accent);
    transition: width 0.1s linear;
}

/* =========================================
   Animations
   ========================================= */
.swiper-slide-active .ki-slide__badge,
.swiper-slide-active .ki-slide__title,
.swiper-slide-active .ki-slide__description,
.swiper-slide-active .ki-slide__ctas,
.swiper-slide-active .ki-slide__visual {
    animation: ki-fade-in-up 0.6s ease-out forwards;
}

.swiper-slide-active .ki-slide__badge { animation-delay: 0s; }
.swiper-slide-active .ki-slide__title { animation-delay: 0.1s; }
.swiper-slide-active .ki-slide__description { animation-delay: 0.2s; }
.swiper-slide-active .ki-slide__ctas { animation-delay: 0.3s; }
.swiper-slide-active .ki-slide__visual { animation-delay: 0.15s; }

@keyframes ki-fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ki-slide__badge,
.ki-slide__title,
.ki-slide__description,
.ki-slide__ctas,
.ki-slide__visual {
    opacity: 0;
}

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 1024px) {
    .ki-slide__container {
        gap: 40px;
        padding: 50px 30px;
    }
    
    .ki-funding-card {
        max-width: 400px;
    }
    
    .ki-funding-card__image {
        height: 280px;
    }
    
    .ki-funding-card:not(:has(.ki-funding-card__image))::before {
        height: 280px;
    }
}

@media (max-width: 768px) {
    :root {
        --ki-slider-height: auto;
        --ki-slider-min-height: auto;
    }
    
    .ki-slider {
        height: auto;
        min-height: auto;
    }
    
    .ki-slide__container {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 50px 20px 70px;
        gap: 30px;
    }
    
    .ki-slide__content {
        order: 1;
    }
    
    .ki-slide__visual {
        order: 2;
    }
    
    .ki-slide__description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .ki-slide__ctas {
        justify-content: center;
    }
    
    .ki-slide--funding .ki-slide__badge {
        justify-content: center;
    }
    
    .ki-slider__nav {
        display: none;
    }
    
    .ki-funding-card {
        max-width: 100%;
    }
    
    .ki-funding-card__image {
        height: 240px;
    }
    
    .ki-funding-card:not(:has(.ki-funding-card__image))::before {
        height: 240px;
    }
    
    .ki-funding-card__badge {
        padding: 12px 16px;
    }
    
    .ki-funding-card__badge::before {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .ki-slide__container {
        padding: 40px 16px 60px;
    }
    
    .ki-slide__badge {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .ki-slide__title {
        font-size: 28px;
    }
    
    .ki-slide__description {
        font-size: 15px;
    }
    
    .ki-slide__ctas {
        flex-direction: column;
        width: 100%;
    }
    
    .ki-btn {
        width: 100%;
        justify-content: center;
    }
    
    .ki-funding-card__image {
        height: 200px;
    }
    
    .ki-funding-card:not(:has(.ki-funding-card__image))::before {
        height: 200px;
    }
    
    .ki-funding-card__badge {
        bottom: 12px;
        right: 12px;
        padding: 10px 14px;
    }
    
    .ki-funding-card__badge::before {
        font-size: 20px;
    }
}

/* =========================================
   Salient Theme Overrides
   ========================================= */
body .ki-slider-wrapper,
body.material .ki-slider-wrapper {
    font-family: var(--ki-font-body);
}

body .ki-slider-wrapper h1,
body .ki-slider-wrapper h2 {
    font-family: var(--ki-font-display);
    margin-top: 0;
    padding: 0;
}

body .ki-slider-wrapper a {
    text-decoration: none;
    box-shadow: none;
}

body .ki-slider-wrapper .ki-btn {
    background-image: none;
    text-shadow: none;
}

/* =========================================
   Accessibility
   ========================================= */
@media (prefers-reduced-motion: reduce) {
    .swiper-slide-active .ki-slide__badge,
    .swiper-slide-active .ki-slide__title,
    .swiper-slide-active .ki-slide__description,
    .swiper-slide-active .ki-slide__ctas,
    .swiper-slide-active .ki-slide__visual {
        animation: none;
        opacity: 1;
    }
    
    .ki-btn,
    .ki-slider__nav-btn {
        transition: none;
    }
}

.ki-btn:focus-visible,
.ki-slider__nav-btn:focus-visible {
    outline: 2px solid var(--ki-accent);
    outline-offset: 2px;
}

/* =========================================
   Print Styles
   ========================================= */
@media print {
    .ki-slider-wrapper {
        position: static;
        width: 100%;
        margin: 0;
    }
    
    .ki-slider__nav,
    .ki-slider__pagination,
    .ki-slider__progress {
        display: none;
    }
}
