/* ================================================
   LEISTUNGEN.CSS - Leistungen-Seite Stile
   Sami-Konzeptwerk
   ================================================ */

/* Split Section Layout */
.split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-4xl);
    align-items: stretch;
}

.split-section.reversed {
    direction: rtl;
}

.split-section.reversed>* {
    direction: ltr;
}

.split-content {
    padding: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.split-image {
    border-radius: var(--radius-2xl);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* USP Modern Icon */
.usp-modern-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-vibrant);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-spring);
}

.usp-modern-icon svg {
    stroke: white;
    width: 28px;
    height: 28px;
}

/* Pricing Section */
.pricing-section {
    padding: var(--spacing-3xl) 0;
    background: var(--bg-secondary);
}

.pricing-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.pricing-header h2 {
    margin-bottom: var(--spacing-sm);
}

.pricing-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-xl);
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-2xl);
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
}

.pricing-card.featured {
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: white;
    padding: var(--spacing-xs) var(--spacing-lg);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.pricing-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: var(--spacing-lg);
}

.pricing-price {
    margin-bottom: var(--spacing-xl);
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin-bottom: var(--spacing-xl);
    text-align: left;
}

.pricing-features li {
    padding: var(--spacing-sm) 0;
    padding-left: var(--spacing-lg);
    position: relative;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

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

.pricing-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* FAQ Section */
.faq-section {
    padding: var(--spacing-3xl) 0;
    background: var(--bg-primary);
}

.faq-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    margin-bottom: var(--spacing-md);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.faq-item:hover {
    border-color: var(--primary-color);
}

.faq-question {
    width: 100%;
    padding: var(--spacing-lg);
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    position: relative;
    padding-right: 3rem;
}

.faq-question svg {
    display: none !important;
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: var(--spacing-lg);
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--accent-purple);
    transition: transform var(--transition-normal);
}

.faq-item.active .faq-question::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 var(--spacing-lg) var(--spacing-lg);
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* ================================================
   LEISTUNGEN PAGE RESPONSIVE
   ================================================ */


/* Global button style for split-content as per user request */
.split-content .btn-primary {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    padding-left: var(--spacing-lg);
    padding-right: var(--spacing-lg);
    max-width: 100%;
    /* Override base.css mobile limitation */
}

@media (max-width: 968px) {
    .split-section {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }

    .split-section.reversed {
        direction: ltr;
    }

    .split-image {
        min-height: 300px;
    }

    .card .split-section {
        gap: var(--spacing-xl);
    }
}

@media (max-width: 768px) {
    .pricing-card.featured {
        transform: none;
    }

    /* Mobile improvements for Card Wrapper */
    .split-section {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: var(--spacing-sm);
        /* Reduced gap */
    }

    .split-image {
        order: -1;
        width: 100%;
        max-width: 100%;
        height: auto !important;
        min-height: 200px !important;
        aspect-ratio: 16/9;
        margin: 0;
        /* Remove margin as gap handles spacing */
    }

    .split-image.leistungen-inline-5 {
        min-height: 350px !important;
        aspect-ratio: auto;
    }

    .split-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .split-content {
        padding-left: 0;
        padding-right: 0;
        width: 100%;
    }

    /* Hide header on mobile */
    .split-content-header {
        display: none !important;
    }
}

/* Fix Glass Card Shadow globally */
.glass-card {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08) !important;
}

.dark-mode .glass-card {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.05);
}

/* ================================================
   SPLIT CONTENT HEADER - Inline SVG + H3
   ================================================ */
.split-content-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.split-content-header .usp-modern-icon {
    margin-bottom: 0;
    flex-shrink: 0;
}

.split-content-header h3 {
    margin: 0;
    font-size: 1.75rem;
}


/* Standard Vertical Layout */
.cards-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-4xl);
}

.card-wrapper {
    /* Reset styles */
    height: auto;
    min-height: auto;
    padding: 0;
    margin: 0;
    width: 100%;
}

.card {
    /* Reset styles to be a normal block */
    width: 100%;
    height: auto;
    min-height: auto;
    margin: 0;
    background-color: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
}

/* Ensure split section inside card works well */
.card .split-section {
    padding: 0;
    gap: var(--spacing-2xl);
}

/* ================================================
   SERVICES TAGS GRID (Mobile Tags View)
   ================================================ */

/* Desktop Default (Grid Layout) */
.services-tags-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.services-tags-grid .glass-card {
    padding: var(--spacing-md);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.services-tags-grid strong {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.services-tags-grid span {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Mobile View (Tags Layout) */
@media (max-width: 768px) {
    .services-tags-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: var(--spacing-lg);
    }

    .services-tags-grid .glass-card {
        width: auto;
        padding: 8px 16px;
        border-radius: 999px;
        /* Pill shape */
        background: rgba(255, 255, 255, 0.6);
        border: 1px solid var(--border-color);
        box-shadow: none !important;
        /* Remove shadow for flat tag look or keep subtle? User said tag. Tags usually are flat or stick out slightly */
        /* Let's keep the globally defined subtle shadow or remove it if 'flat' is preferred. 
           User didn't specify flat, just 'tags'. Tags usually implying shape and flow. */
    }

    .dark-mode .services-tags-grid .glass-card {
        background: rgba(30, 41, 59, 0.6);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .services-tags-grid strong {
        margin-bottom: 0;
        font-size: 0.85rem;
        font-weight: 500;
    }

    .services-tags-grid span {
        display: none;
        /* Hide descriptions on mobile */
    }
}

/* ================================================
   MOBILE PRICING TABS & NEUTRAL STYLING
   ================================================ */

/* Hide Tabs on Desktop */
.pricing-tabs {
    display: none;
}

@media (max-width: 768px) {

    /* --- Tab Navigation --- */
    .pricing-tabs {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-bottom: var(--spacing-2xl);
        background: var(--bg-tertiary);
        padding: 5px;
        border-radius: var(--radius-full);
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .pricing-tab-btn {
        flex: 1;
        padding: 10px 16px;
        text-align: center;
        background: transparent;
        border: none;
        border-radius: var(--radius-full);
        font-weight: 600;
        font-size: 0.95rem;
        color: var(--text-secondary);
        cursor: pointer;
        transition: all 0.3s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .pricing-tab-btn.active {
        background: var(--card-bg);
        color: var(--primary-color);
        box-shadow: var(--shadow-sm);
    }

    .dark-mode .pricing-tabs {
        background: var(--bg-secondary);
    }

    .dark-mode .pricing-tab-btn.active {
        background: var(--bg-tertiary);
        color: var(--text-primary);
    }

    /* --- Mobile Pricing Grid Behavior --- */
    .pricing-grid {
        display: block;
        /* Override grid layout */
        position: relative;
    }

    /* Hide Inactive Cards */
    .pricing-card {
        display: none;
        opacity: 0;
        transform: translateY(10px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    /* Show Active Card */
    .pricing-card.active-tab-content {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }

    /* --- Neutral Form Styling (No Container/Card Look) --- */
    .pricing-card.active-tab-content {
        /* Reset Card Styles */
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        text-align: center;
        /* Center align for neutral look */
    }

    .pricing-card.featured {
        transform: none !important;
    }

    /* Hide Header & Old Badge on Mobile */
    .pricing-header,
    .pricing-badge {
        display: none !important;
    }

    /* --- Mobile Badge Styling --- */
    .pricing-tab-btn {
        position: relative;
        /* Anchor for badge */
        overflow: visible;
    }

    .mobile-pricing-badge {
        position: absolute;
        top: -12px;
        right: -5px;
        background: var(--gradient-primary);
        color: white;
        font-size: 0.65rem;
        font-weight: 700;
        padding: 4px 8px;
        border-radius: 999px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
        white-space: nowrap;
        z-index: 5;
        border: 2px solid var(--bg-tertiary);
    }

    /* Price Adjustments */
    .pricing-price {
        margin: var(--spacing-xl) 0;
    }

    .price-amount {
        font-size: 3.5rem;
        display: block;
        margin-bottom: var(--spacing-xs);
        line-height: 1;
    }

    /* Features List Adjustments */
    .pricing-features {
        max-width: 320px;
        margin: 0 auto var(--spacing-xl);
        border: none;
        text-align: left;
    }

    .pricing-features li {
        border-bottom: 1px solid var(--border-color);
        padding: 12px 0;
        padding-left: 30px;
        font-size: 1rem;
    }

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

    /* --- Staggered Animation on Mobile Loading/Tab Switch --- */
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .pricing-card.active-tab-content .pricing-price,
    .pricing-card.active-tab-content .pricing-features li,
    .pricing-card.active-tab-content .btn-primary,
    .pricing-card.active-tab-content .btn-secondary {
        animation: fadeInUp 0.4s ease-out forwards;
        opacity: 0;
        /* Important for keyframe to start from 0 */
    }

    /* Stagger Delays */
    .pricing-card.active-tab-content .pricing-price {
        animation-delay: 0.05s;
    }

    /* Features Loop Stagger */
    .pricing-card.active-tab-content .pricing-features li:nth-child(1) {
        animation-delay: 0.1s;
    }

    .pricing-card.active-tab-content .pricing-features li:nth-child(2) {
        animation-delay: 0.15s;
    }

    .pricing-card.active-tab-content .pricing-features li:nth-child(3) {
        animation-delay: 0.2s;
    }

    .pricing-card.active-tab-content .pricing-features li:nth-child(4) {
        animation-delay: 0.25s;
    }

    .pricing-card.active-tab-content .pricing-features li:nth-child(5) {
        animation-delay: 0.3s;
    }

    .pricing-card.active-tab-content .btn-primary,
    .pricing-card.active-tab-content .btn-secondary {
        animation-delay: 0.35s;
    }
}

/* Extrahierte Inline-Styles */
.leistungen-inline-1 {
    padding: var(--spacing-5xl) 0;
}

.leistungen-inline-2 {
    text-align: center;
    margin-bottom: var(--spacing-3xl);
}

.leistungen-inline-3 {
    background: var(--gradient-primary);
}

.leistungen-inline-4 {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-xl);
    color: var(--text-secondary);
}

.leistungen-inline-5 {
    border-radius: var(--radius-2xl);
    min-height: 400px;
    overflow: hidden;
}

.leistungen-inline-6 {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.leistungen-inline-7 {
    background: var(--gradient-warm);
}