/* ===================================
   ROI-Rechner Pflege-KI-Caller
   Primary Color: #6CBDD2
   =================================== */

:root {
    --primary: #6CBDD2;
    --primary-dark: #4A9DB0;
    --primary-light: #9DD3E0;
    --secondary: #E9F6FA;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text-dark: #1f2937;
    --text-medium: #4b5563;
    --text-light: #6b7280;
    --bg-white: #ffffff;
    --bg-light: #f9fafb;
    --border: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius: 16px;
    --radius-sm: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(180deg, var(--secondary) 0%, var(--bg-white) 100%);
    color: var(--text-dark);
    line-height: 1.6;
    padding-bottom: 220px; /* Space for sticky footer */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.roi-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 3rem 0;
    box-shadow: var(--shadow-lg);
    margin-bottom: 3rem;
}

.header-nav {
    margin-bottom: 1.5rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-5px);
}

.roi-header h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.roi-header .subtitle {
    font-size: 1.125rem;
    opacity: 0.95;
    font-weight: 400;
}

/* Card Component */
.card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.card h2 {
    font-size: 1.75rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card h2 i {
    color: var(--primary);
}

/* Global Assumptions */
.global-assumptions {
    border-left: 4px solid var(--primary);
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.input-group label {
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tooltip {
    position: relative;
    cursor: help;
    color: var(--primary);
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-dark);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 400;
    width: 250px;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    line-height: 1.4;
}

.tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--text-dark);
}

.slider-input {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    align-items: center;
}

/* Range Slider Styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 10px;
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-md);
}

input[type="number"] {
    width: 80px;
    padding: 0.5rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-dark);
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
}

.unit {
    font-weight: 600;
    color: var(--text-medium);
    min-width: 30px;
}

.hint {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Use Cases Section */
.use-cases-section h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.use-cases-section h2 i {
    color: var(--primary);
}

.section-desc {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

/* Accordion */
.use-cases-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.accordion-item {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-item:hover {
    box-shadow: var(--shadow-md);
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    cursor: pointer;
    background: linear-gradient(90deg, var(--bg-white) 0%, var(--secondary) 100%);
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
}

.accordion-header:hover {
    background: var(--secondary);
}

.accordion-header.active {
    background: var(--primary);
    color: white;
}

.accordion-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.accordion-title h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.accordion-title .stress-badge {
    background: var(--warning);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.accordion-results {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.result-mini {
    text-align: center;
}

.result-mini-label {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
}

.accordion-header.active .result-mini-label {
    color: rgba(255, 255, 255, 0.8);
}

.result-mini-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
}

.accordion-header.active .result-mini-value {
    color: white;
}

.accordion-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
    color: white;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.accordion-content.active {
    max-height: 2000px;
}

.accordion-body {
    padding: 2rem;
    background: var(--bg-light);
}

.use-case-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.use-case-results {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 2px solid var(--primary);
}

.use-case-results h4 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.result-item {
    text-align: center;
    padding: 1rem;
    background: var(--secondary);
    border-radius: var(--radius-sm);
}

.result-label {
    font-size: 0.875rem;
    color: var(--text-medium);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.result-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
}

.result-value.large {
    font-size: 2.5rem;
}

.result-note {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--secondary);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-medium);
    font-style: italic;
}

/* Sticky Summary Footer */
.summary-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.summary-item {
    text-align: center;
}

.summary-item.main {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
}

.summary-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.summary-content {
    text-align: left;
}

.summary-label {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.summary-value {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
}

.summary-value.small {
    font-size: 1.75rem;
}

.summary-value.roi-positive {
    color: #10b981;
}

.summary-value.roi-negative {
    color: #ef4444;
}

.summary-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-export {
    background: white;
    color: var(--primary);
}

.btn-export:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .roi-header h1 {
        font-size: 1.75rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .roi-header .subtitle {
        font-size: 1rem;
    }
    
    .input-grid {
        grid-template-columns: 1fr;
    }
    
    .use-case-inputs {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .accordion-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .accordion-results {
        width: 100%;
        justify-content: space-between;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .summary-item.main {
        justify-content: flex-start;
    }
    
    body {
        padding-bottom: 450px;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 1.5rem;
    }
    
    .accordion-body {
        padding: 1.5rem;
    }
    
    .summary-value {
        font-size: 2rem;
    }
    
    .summary-value.small {
        font-size: 1.5rem;
    }
    
    .slider-input {
        grid-template-columns: 1fr;
    }
    
    input[type="number"] {
        width: 100%;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Can be implemented later */
}
