/* Rentenbesteuerung Rechner Styles */
:root {
    --primary-color: #005a9e;
    --primary-dark: #004380;
    --secondary-color: #f8f9fa;
    --accent-color: #28a745;
    --accent-hover: #218838;
    --text-color: #333;
    --light-gray: #e9ecef;
    --border-color: #dee2e6;
    --shadow: 0 2px 5px rgba(0,0,0,0.1);
    --chart-color-1: #005a9e;
    --chart-color-2: #28a745;
    --chart-color-3: #ffc107;
    --chart-color-4: #dc3545;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
}

h2 {
    font-size: 2rem;
    color: var(--primary-dark);
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 0.5rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */
header {
    background-color: var(--primary-color);
  /*  color: white;*/
    padding: 2rem 0;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

header h1 {
   /* color: white;*/
    margin-bottom: 0.5rem;
}

.subheading {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Main content sections */
section {
    margin-bottom: 3rem;
}

.intro {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.source-info {
    background-color: var(--light-gray);
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

/* Calculator form */
.calculator-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-top: 1.5rem;
}

fieldset {
    border: 1px solid var(--light-gray);
    border-radius: 5px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

legend {
    font-weight: 600;
    color: var(--primary-color);
    padding: 0 10px;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

input[type="number"],
input[type="text"],
select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 90, 158, 0.2);
}

.radio-group {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.radio-group input[type="radio"] {
    margin-right: 0.5rem;
}

.tooltip {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.3rem;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}

button {
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 4px;
    transition: background-color 0.3s, transform 0.1s;
}

button:hover {
    transform: translateY(-1px);
}

button:active {
    transform: translateY(1px);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--light-gray);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #d9dde1;
}

/* Results section */
.results-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 2rem;
}

.results-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 1.5rem 0;
}

.results-summary {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-box {
    background-color: var(--light-gray);
    padding: 1rem;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-box.primary {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.result-box.total {
    background-color: #e9f5ff;
    font-weight: 600;
    border-left: 4px solid var(--primary-color);
}

.result-box.net {
    background-color: var(--accent-color);
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

.result-box.monthly {
    border: 1px dashed var(--accent-color);
    background-color: #f0fff5;
}

.value {
    font-weight: 600;
}

/* Detailed results table */
.details-table {
    width: 100%;
    border-collapse: collapse;
}

.details-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--light-gray);
}

.details-table tr:last-child td {
    border-bottom: none;
    font-weight: 600;
}

.details-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Chart */
.chart-container {
    margin: 2rem 0;
}

.chart-wrapper {
    height: 300px;
    margin-top: 1.5rem;
}

/* Accordion for explanations */
.explanation {
    margin-top: 2rem;
}

.accordion {
    margin-top: 1rem;
}

.accordion-item {
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.accordion-button {
    width: 100%;
    text-align: left;
    background-color: var(--light-gray);
    padding: 1rem;
    font-weight: 600;
    border: none;
    position: relative;
    cursor: pointer;
}

.accordion-button::after {
    content: "+";
    position: absolute;
    right: 1rem;
}

.accordion-button.active::after {
    content: "−";
}

.accordion-content {
    display: none;
    padding: 1rem;
    background-color: #fff;
}

.accordion-content.active {
    display: block;
}

.disclaimer {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem;
    margin: 2rem 0;
    font-size: 0.9rem;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

/* FAQ section */
.faq-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 2rem;
}

.faq-container {
    margin-top: 1.5rem;
}

.faq-item {
    margin-bottom: 1.5rem;
}

.faq-item h3 {
    color: var(--primary-dark);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background-color: var(--primary-dark);
   /* color: #fff;*/
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
    font-size: 0.9rem;
}

/* Responsiveness */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.7rem;
    }
    
    .results-container {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

/* Print styles */
@media print {
    header, footer, .calculator-section, .faq-section, .action-buttons {
        display: none;
    }
    
    .results-section {
        display: block !important;
        box-shadow: none;
    }
    
    body, html {
        background-color: white;
    }
}
