/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #27ae60;
    --danger-color: #e74c3c;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f8f9fa;
    --white: #ffffff;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

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

/* Header & Navigation */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #34495e 100%);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.3s;
}

.logo:hover {
    opacity: 0.9;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 0;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--secondary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--white);
    border-radius: 3px;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2980b9 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero .subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
}

/* Calculator Section */
.calculator-section {
    padding: 3rem 0;
}

.calculator-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.calculator-card h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

/* Form Styles */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.form-group input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.btn-calculate {
    background: linear-gradient(135deg, var(--accent-color) 0%, #229954 100%);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    margin-top: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.btn-calculate:active {
    transform: translateY(0);
}

/* Results */
.results {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.results h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.results h4 {
    color: var(--primary-color);
    margin: 2rem 0 1rem;
    font-size: 1.3rem;
}

/* Result Summary */
.result-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
}

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

.summary-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.summary-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
}

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

.result-item {
    background: var(--bg-color);
    padding: 1.25rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.result-item.highlight {
    background: linear-gradient(135deg, var(--accent-color) 0%, #229954 100%);
    color: var(--white);
    font-size: 1.1rem;
}

.result-item.highlight-secondary {
    background: linear-gradient(135deg, var(--danger-color) 0%, #c0392b 100%);
    color: var(--white);
}

.result-label {
    font-weight: 600;
    font-size: 0.9rem;
}

.result-item.highlight .result-label,
.result-item.highlight-secondary .result-label {
    opacity: 0.95;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Info Section */
.info-section {
    padding: 4rem 0;
    background: var(--white);
}

.info-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 3rem;
    font-size: 2rem;
}

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

.info-card {
    text-align: center;
    padding: 2rem;
    border-radius: 12px;
    background: var(--bg-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.info-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.info-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.info-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* Content Section */
.content-section {
    padding: 4rem 0;
}

.content-section article {
    background: var(--white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.content-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.content-section h3 {
    color: var(--primary-color);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.content-section h4 {
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.content-section p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
    color: var(--text-color);
}

.content-section ul {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.content-section li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
    color: var(--text-color);
}

.content-section strong {
    color: var(--primary-color);
}

/* Steuerklassen Info */
.steuerklassen-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.steuerklasse-item {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

.steuerklasse-item h4 {
    margin-top: 0;
    color: var(--secondary-color);
}

/* FAQ */
.faq-item {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--accent-color);
}

.faq-item h4 {
    margin-top: 0;
    color: var(--accent-color);
}

/* Ad Container */
.ad-container {
    margin: 2rem 0;
    text-align: center;
    min-height: 100px;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, #34495e 100%);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p {
    opacity: 0.9;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.footer-section a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.8;
}

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

    .hero .subtitle {
        font-size: 1rem;
    }

    .calculator-card {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .result-grid {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .steuerklassen-info {
        grid-template-columns: 1fr;
    }

    .content-section article {
        padding: 1.5rem;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--primary-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .calculator-card h2 {
        font-size: 1.5rem;
    }

    .content-section h2 {
        font-size: 1.5rem;
    }

    .content-section h3 {
        font-size: 1.25rem;
    }

    .logo {
        font-size: 1.2rem;
    }
}

/* Chart Visualization */
.result-chart {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.chart-bar {
    display: flex;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    margin: 1rem 0;
}

.chart-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
    position: relative;
}

.chart-segment.netto {
    background: linear-gradient(135deg, var(--accent-color) 0%, #229954 100%);
}

.chart-segment.steuern {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.chart-segment.sozial {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.chart-label {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.chart-legend {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.legend-color.netto {
    background: var(--accent-color);
}

.legend-color.steuern {
    background: var(--danger-color);
}

.legend-color.sozial {
    background: var(--secondary-color);
}

/* Comparison Section */
.comparison-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-color);
    border-radius: 8px;
}

.comparison-hint {
    color: var(--text-light);
    margin-bottom: 1rem;
}

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

.comparison-item {
    padding: 1rem;
    background: var(--white);
    border-radius: 8px;
    text-align: center;
    border: 2px solid var(--border-color);
    transition: all 0.3s;
}

.comparison-item.current {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1) 0%, rgba(34, 153, 84, 0.1) 100%);
}

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

.comparison-class {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.comparison-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.comparison-diff {
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.comparison-diff.positive {
    color: var(--accent-color);
}

.comparison-diff.negative {
    color: var(--danger-color);
}

/* Result Actions */
.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn-action {
    padding: 0.75rem 1.5rem;
    background: var(--white);
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-action:hover {
    background: var(--secondary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* Print Styles */
@media print {
    header, footer, .ad-container, .btn-calculate, .result-actions, .comparison-section {
        display: none;
    }

    .calculator-card, .content-section article {
        box-shadow: none;
        page-break-inside: avoid;
    }

    .result-chart {
        page-break-inside: avoid;
    }
}
