
    /* ===== HEIZLASTRECHNER ENHANCED CSS ===== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&display=swap' );

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

:root {
    --primary-orange: #ff6b35;
    --primary-blue: #1e3a8a;
    --accent-yellow: #fbbf24;
    --dark-blue: #0f172a;
    --light-gray: #f8fafc;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --success-color: #22c55e;
    --border-color: #e2e8f0;
    
    /* Abstände */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 20px;
    --spacing-lg: 30px;
    --spacing-xl: 40px;
    --spacing-xxl: 60px;
    --spacing-xxxl: 80px;
    --spacing-section: 60px;
    
    /* Border Radius */
    --radius: 16px;
    --radius-sm: 8px;
    --radius-md: 15px;
    --radius-lg: 20px;
    --radius-full: 50px;
    
    /* Schatten */
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 15px 40px rgba(0,0,0,0.2);
    
    /* Transition */
    --transition: all 0.3s ease;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--dark-blue);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    overflow-x: hidden;
    background-attachment: fixed;
    padding-top: 85px;
}

/* Animated Grid Background */
@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Main Content */
main {
    margin-top: 0;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section */
.hero {
    background: transparent;
    padding: 100px 0 60px 0;
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: auto;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.5s forwards;
    line-height: 1.1;
}

.hero h1 span {
    color: var(--accent-yellow);
    font-size: 1.8rem;
    font-weight: 400;
    margin-top: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: var(--spacing-md);
    font-weight: 400;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.8s forwards;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Container Base Styles */
.calculator-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 10;
    margin-bottom: 120px;
}

.calculator-container {
    position: relative;
    transition: var(--transition);
}

.calculator-container.hidden {
    display: none;
}

.results {
    display: none;
    animation: slideIn 0.5s ease-out;
}

.results.show {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Calculator Card */
.calculator-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
    min-height: 800px;
    display: flex;
    flex-direction: column;
}

.calculator-header {
    background: rgba(255, 255, 255, 0.98);
    color: var(--text-dark);
    padding: 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid var(--primary-blue);
    flex-shrink: 0;
}

.calculator-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
    color: var(--primary-blue);
}

.calculator-header p {
    font-size: 16px;
    opacity: 1;
    position: relative;
    z-index: 1;
    font-weight: 400;
    color: var(--text-muted);
}

/* Form Styles */
.calculator-form {
    padding: 32px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    flex-grow: 1;
}

.form-section {
    background: rgba(248, 250, 252, 0.9);
    backdrop-filter: blur(5px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 28px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.form-section:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--primary-orange);
    background: rgba(255, 255, 255, 0.95);
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
}

.section-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-orange);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    flex-shrink: 0;
}

.section-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--white);
    stroke-width: 2;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1.2;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 15px;
    gap: 8px;
}

/* Info Icon für U-Wert Erklärung */
.info-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: var(--primary-blue);
    color: var(--white);
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    cursor: help;
    margin-left: 4px;
}

.info-tooltip {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-800);
    color: var(--white);
    padding: 12px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.4;
    width: 280px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.info-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--gray-800);
}

.info-icon:hover .info-tooltip {
    opacity: 1;
    visibility: visible;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: stretch;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid var(--border-color);
    background: var(--white);
    transition: var(--transition);
}

/* Visuelles Feedback für gültige Eingaben */
.input-wrapper.valid {
    border-color: var(--success-color);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.input-wrapper:focus-within {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    font-size: 16px;
    color: var(--text-dark);
    font-weight: 500;
    outline: none;
}

.unit {
    background: var(--gray-800);
    color: var(--white);
    padding: 0 12px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: none;
}

.help-text {
    font-size: 13px;
    color: var(--gray-700);
    margin-top: 6px;
    line-height: 1.5;
    background: rgba(30, 58, 138, 0.08);
    padding: 6px 10px;
    border-radius: 6px;
    border-left: 3px solid var(--primary-blue);
}

/* Calculate Button */
.calculate-section {
    padding: 0 32px 32px;
    margin-top: auto;
}

.calculate-btn {
    width: 100%;
    background: var(--primary-orange);
    color: var(--white);
    border: none;
    padding: 18px 35px;
    font-size: 17px;
    font-weight: 700;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.35);
    position: relative;
    overflow: hidden;
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.calculate-btn:active {
    transform: scale(0.98);
}

.calculate-btn svg {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    vertical-align: middle;
}

/* Results Section */
.results-content {
    padding: 32px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.results-header {
    text-align: center;
    margin-bottom: 28px;
}

.results-header h3 {
    font-size: 26px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.results-header p {
    color: var(--gray-600);
    font-size: 15px;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.result-item {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    border-radius: var(--radius-md);
    padding: 16px 12px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    border: 2px solid rgba(203, 213, 225, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.result-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.result-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.result-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--white);
    stroke-width: 2;
}

.result-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 6px;
    line-height: 1;
}

.result-label {
    font-size: 12px;
    color: var(--gray-600);
    font-weight: 500;
    line-height: 1.3;
}

.result-item.success .result-value {
    color: var(--success-color);
}

/* Enhanced Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

/* Neue Sektion für Wärmeverluste-Aufschlüsselung - ENHANCED */
.breakdown-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border: 2px solid rgba(203, 213, 225, 0.8);
    position: relative;
}

.breakdown-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 24px;
    text-align: center;
}

.breakdown-chart-container {
    position: relative;
    height: 400px;
    margin-bottom: 24px;
}

.breakdown-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-700);
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Hellstrahler Comparison Chart - SMALLER */
.hellstrahler-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 2px solid rgba(34, 197, 94, 0.3);
    position: relative;
}

.hellstrahler-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--success-color);
    margin-bottom: 16px;
    text-align: center;
}

.hellstrahler-chart-container {
    position: relative;
    height: 200px;
    margin-bottom: 16px;
}

.hellstrahler-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.hellstrahler-legend .legend-item {
    font-size: 13px;
}

.hellstrahler-legend .legend-color {
    width: 16px;
    height: 16px;
}

/* Explanation Text Section */
.explanation-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    border: 1px solid rgba(203, 213, 225, 0.8);
    border-left: 4px solid var(--primary-blue);
}

.explanation-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.explanation-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-700);
}

.explanation-content p {
    margin-bottom: 12px;
}

.explanation-content ul {
    margin-left: 20px;
    margin-bottom: 12px;
}

.explanation-content li {
    margin-bottom: 6px;
}

.comparison-section {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    border: 1px solid rgba(203, 213, 225, 0.8);
}

.comparison-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 20px;
    text-align: center;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.comparison-item {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.comparison-item.recommended {
    border-color: var(--success-color);
    background: rgba(34, 197, 94, 0.05);
}

.comparison-item h4 {
    color: var(--text-dark);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.comparison-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.comparison-item.recommended .comparison-value {
    color: var(--success-color);
}

.comparison-item:not(.recommended) .comparison-value {
    color: var(--text-muted);
}

.savings-highlight {
    background: var(--success-color);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 24px;
}

.savings-highlight h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

/* Action Buttons Section */
.action-buttons {
    display: flex !important;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 16px;
    padding: 16px 20px;
    border-top: 2px solid var(--border-color);
    background: rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
}

.action-btn {
    background: var(--primary-blue) !important;
    color: var(--white) !important;
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    min-width: 120px;
    justify-content: center;
}

.action-btn.reset {
    background: var(--gray-600) !important;
}

.action-btn.pdf {
    background: var(--primary-orange) !important;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.action-btn.reset:hover {
    background: var(--gray-700) !important;
}

.action-btn.pdf:hover {
    background: #e55a00 !important;
}

.action-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.disclaimer {
    background: var(--accent-yellow);
    color: var(--gray-800);
    padding: 12px;
    border-radius: 10px;
    margin-top: 16px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-blue);
    color: var(--white);
    padding: 8px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    z-index: 10001;
}

.skip-link:focus {
    top: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero h1 span {
        font-size: 1.2rem;
    }

    .calculator-card {
        margin: 0 10px;
        min-height: auto;
    }

    .calculator-form,
    .calculator-header,
    .results-content {
        padding: 20px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .charts-section {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .breakdown-chart-container {
        height: 300px;
    }

    .hellstrahler-chart-container {
        height: 180px;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .action-btn {
        width: 100%;
        max-width: 280px;
    }

    .info-tooltip {
        width: 240px;
    }
}

/* Tablet Responsive */
@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-section:last-child {
        grid-column: 1 / -1;
    }
    
    .results-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop Responsive */
@media (min-width: 1024px) {
    .hero {
        padding: 140px 0 100px 0;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero h1 span {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1.3rem;
    }
    
    .form-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .form-section:last-child {
        grid-column: auto;
    }
    
    .results-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Print Styles */
@media print {
    header, footer, .action-buttons, .mobile-menu-toggle {
        display: none !important;
    }
    
    body {
        background: white !important;
        padding-top: 0 !important;
    }
    
    .hero {
        display: none !important;
    }
    
    .calculator-card {
        box-shadow: none !important;
        border: 2px solid #333 !important;
    }
}

/* Harmonized social icon visibility */
.social-icons img,
.social-icons svg,
.adress_footer .social-icons img,
.adress_footer .social-icons svg,
#adress_footer .social-icons img,
#adress_footer .social-icons svg {
  filter: none !important;
  opacity: 1 !important;
}
