/* Portfolio Aufbau Specific Styles */

/* Interactive Calculator */
.interactive-calculator {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(34, 197, 94, 0.2);
    margin: 2rem 0;
}

.interactive-calculator h3 {
    color: #22c55e;
    text-align: center;
    margin: 0 0 1.5rem 0;
}

.calculator-input {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.calculator-input label {
    font-weight: 600;
    color: var(--text-color);
}

.calculator-input input {
    padding: 0.5rem;
    border: 2px solid #22c55e;
    border-radius: 4px;
    font-size: 1rem;
    width: 80px;
    text-align: center;
}

.calculator-input input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

#ageDisplay {
    font-weight: 600;
    color: #22c55e;
}

.allocation-result {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid #e5e7eb;
}

.allocation-bar {
    height: 40px;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    margin-bottom: 1rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.stocks-portion {
    background: linear-gradient(90deg, #10b981, #22c55e);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.bonds-portion {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.allocation-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stocks-label {
    color: #22c55e;
    font-weight: 600;
}

.bonds-label {
    color: #3b82f6;
    font-weight: 600;
}

.allocation-explanation {
    text-align: center;
    padding: 1rem;
    background: rgba(34, 197, 94, 0.05);
    border-radius: 4px;
    border-left: 4px solid #22c55e;
}

.allocation-explanation p {
    margin: 0;
    font-style: italic;
    color: var(--text-color);
}

/* Principles Grid */
.principles-grid {
    display: grid;
    grid-template-columns: repeat(2, 280px);
    width: fit-content;
    margin: auto;
    gap: 2rem;
    margin-top: 2rem;
}

.principle-card {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid #22c55e;
    transition: var(--transition);
}

.principle-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-left-color: #10b981;
}

.principle-card h3 {
    color: #22c55e;
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
}

/* Asset Allocation Examples */
.allocation-examples {
    display: grid;
    grid-template-columns: repeat(3, auto);
    width: fit-content;
    margin: auto;
    gap: 2rem;
    margin-top: 2rem;
}

.allocation-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}

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

.allocation-card.conservative {
    border-color: #3b82f6;
}

.allocation-card.balanced {
    border-color: #f59e0b;
}

.allocation-card.aggressive {
    border-color: #ef4444;
}

.allocation-card h3 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
}

.allocation-card.conservative h3 {
    color: #3b82f6;
}

.allocation-card.balanced h3 {
    color: #f59e0b;
}

.allocation-card.aggressive h3 {
    color: #ef4444;
}

/* Pie Chart Styling */
.pie-chart {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 1rem auto;
    position: relative;
    overflow: hidden;
    background: #e5e7eb;
}

.allocation-card.conservative .pie-chart {
    background: conic-gradient(#3b82f6 0deg 216deg, #10b981 216deg 360deg);
}

.allocation-card.balanced .pie-chart {
    background: conic-gradient(#22c55e 0deg 252deg, #3b82f6 252deg 360deg);
}

.allocation-card.aggressive .pie-chart {
    background: conic-gradient(#22c55e 0deg 324deg, #3b82f6 324deg 360deg);
}

/* Steps Container */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-radius: var(--border-radius);
    border: 1px solid rgba(34, 197, 94, 0.2);
    transition: var(--transition);
}

.step-item:hover {
    transform: translateX(5px);
    border-color: #22c55e;
}

.step-number {
    background: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-content h3 {
    color: #22c55e;
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}

.step-content p {
    margin: 0;
    color: var(--text-color);
}

/* Portfolio Types Grid */
.portfolio-types-grid {
    display: grid;
    grid-template-columns: repeat(2, 280px);
    width: fit-content;
    margin: auto;
    gap: 2rem;
    margin-top: 2rem;
}

.portfolio-type {
    background: white;
    border: 2px solid #22c55e;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: var(--transition);
}

.portfolio-type:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: #10b981;
}

.portfolio-type h3 {
    color: #22c55e;
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
}

.portfolio-type p:first-of-type {
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 0.5rem 0;
}

.portfolio-type p:last-of-type {
    margin: 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Rebalancing Info */
.rebalancing-info {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(34, 197, 94, 0.2);
    margin-top: 1rem;
}

.rebalancing-methods {
    display: grid;
    grid-template-columns: repeat(2, 280px);
    width: fit-content;
    margin: auto;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.method-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid #22c55e;
    transition: var(--transition);
}

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

.method-card h3 {
    color: #22c55e;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

/* Tips Section */
.tips-list {
    display: grid;
    grid-template-columns: repeat(2, 300px);
    width: fit-content;
    margin: auto;
    gap: 1.5rem;
    margin-top: 2rem;
}

.tip-item {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid #22c55e;
    transition: var(--transition);
}

.tip-item:hover {
    transform: translateX(5px);
    border-left-color: #10b981;
}

.tip-item h3 {
    color: #22c55e;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .principles-grid,
    .allocation-examples,
    .portfolio-types-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .steps-container {
        gap: 1rem;
    }
    
    .step-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .rebalancing-methods {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .tips-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
} 

/* styles.css for Portfolio Aufbau Guide */

/* --- Steps Container with Timeline --- */
.steps-container {
    position: relative;
    padding-left: 50px; /* Space for the timeline */
    max-width: max-content; /* Container only takes up needed width */
    margin: auto;
}

/* The vertical timeline bar */
.steps-container::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 10px;
    bottom: 10px;
    width: 4px;
    background-color: #e0e0e0;
    border-radius: 2px;
}

.step-item {
    position: relative;
    margin-bottom: 30px;
}

.step-number {
    position: absolute;
    left: -50px;
    top: 0;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: #3b71ca; /* Primary blue from your theme */
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
    box-shadow: 0 0 0 4px #e0e0e0;
}

.step-content {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.step-content h3 {
    margin-top: 0;
}

/* --- Allocation Pie Chart Slices --- */
.allocation-card {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: border-color 0.3s;
}

.allocation-card.conservative { border-color: #3b71ca; }
.allocation-card.balanced { border-color: #ffc107; }
.allocation-card.aggressive { border-color: #dc3545; }

.allocation-card h3 {
    margin-top: 0;
    font-size: 1.2em;
}

.conservative h3 { color: #3b71ca; }
.balanced h3 { color: #ffc107; }
.aggressive h3 { color: #dc3545; }

/* New container style for the canvas */
.pie-chart-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 15px auto;
}

.pie-chart .slice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 5px;
    font-size: 0.9em;
    transition: transform 0.3s ease;
}

/* Exploded Pie Effect on Hover */
.allocation-card:hover .pie-chart .slice.stocks {
    transform: translateX(-5px);
}
.allocation-card:hover .pie-chart .slice.bonds {
    transform: translateX(5px);
}

.pie-chart .slice strong {
    font-size: 1.4em;
    font-weight: bold;
}

.pie-chart .slice span {
    display: block;
    margin-top: 2px;
}

.pie-chart .slice.stocks {
    background-color: #3b71ca; /* Blue for stocks */
}

.pie-chart .slice.bonds {
    background-color: #6c757d; /* Gray for bonds */
}

/* Adjustments for different percentages */
.conservative .slice.stocks { flex-basis: 40%; }
.conservative .slice.bonds { flex-basis: 60%; }

.balanced .slice.stocks { flex-basis: 70%; }
.balanced .slice.bonds { flex-basis: 30%; }

.aggressive .slice.stocks { flex-basis: 90%; }
.aggressive .slice.bonds { flex-basis: 10%; } 