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

html, body {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

.gradient-section {
    background: linear-gradient(135deg, #1D2540 0%, #2979FF 100%) !important;
}


/* .hero styles removed to use only styles.css */

.etf-cards-section > .container,
.etf-calculator-section > .container,
.broker-section > .container,
.faq-section > .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
    box-sizing: border-box;
}

.etf-cards-section > .container > h2, .etf-cards-section > h2 {
    margin-top: 2rem;
}

.etf-cards-section > .container > p,
.broker-section > .container > p {
    color: #fff;
    text-align: center;
    margin-bottom: 2.2rem;
    font-size: 1.08rem;
    margin-top: 0.5rem;
}


h1 {
    text-align: center;
    font-size: calc(var(--base-font-size) * 2.2);
    margin-top: 2rem;
    margin-bottom: calc(var(--spacing-unit) * 1.5);
    white-space: nowrap;
}

.subtitle {
    text-align: center;
    color: #B0B0B0;
    margin-bottom: calc(var(--spacing-unit) * 2);
    font-size: calc(var(--base-font-size) * 1.2);
}

/* Data Update Indicator */
.data-update-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(41, 121, 255, 0.1);
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #B0B0B0;
}

.refresh-btn {
    background-color: transparent;
    border: none;
    color: #2979FF;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.3s;
}

.refresh-btn:hover {
    color: #fff;
}

.refresh-btn.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ETF Cards Section */
.etf-cards {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 2rem 0;
}

.etf-cards h2 {
    width: 100%; /* Full width of parent */
    margin: 0 0 2rem 0; /* Add bottom margin */
    padding: 0 1rem; /* Add horizontal padding */
    color: #FFFFFF;
    font-size: 1.75rem; /* Adjust font size */
    text-align: left; /* Align title to the left */
}

.etf-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Exactly 4 cards per row */
    width: 100%; /* Full width of parent */
    gap: 1.5rem; /* Gap between grid items */
    margin: 0;
    padding: 0 0 2.2rem 0;
    align-items: stretch; /* Ensure all grid items (cards) have the same height */
}


.etf-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
    height: auto;
    box-sizing: border-box;
}

/* Glow-Effekt für ausgewählte Card */
.etf-card.selected {
    box-shadow: 0 0 0 2px #2979FF, 0 0 16px 4px rgba(41,121,255,0.30), 0 4px 16px rgba(0,0,0,0.10) !important;
    z-index: 2;
    border: 1px solid #2979FF;
    transition: box-shadow 0.3s, border 0.3s;
}


.etf-card {
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.etf-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.etf-card h3 {
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    flex-grow: 1;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.etf-info {
    color: var(--text-secondary);
    font-size: calc(var(--base-font-size) * 0.9);
    margin-bottom: 0.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.etf-region {
    color: var(--primary-color);
    font-size: calc(var(--base-font-size) * 0.9);
    font-weight: 500;
    margin-top: auto;
}

/* Detaillierte ETF-Analyse Title - New Position */
h2.etf-analysis-title {
    width: 100%; /* Full width of parent */
    margin: 4rem 0 2rem 0; /* Remove auto margins */
    padding: 0 1rem; /* Add horizontal padding */
    color: #FFFFFF;
    font-size: 1.75rem;
    text-align: left;
}

/* Tabs Container - Adjust for consistent width and centering */
.tabs-container {
    width: 100%;
    max-width: var(--container-width);
    margin: 1rem 0 2rem 0;
    padding: 0 var(--spacing-unit);
    box-sizing: border-box;
    padding-top: 0.7rem;
    padding-bottom: 2rem;
    margin-bottom: 3rem;
}

.tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    color: #FFFFFF;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    flex: 1;
    text-align: center;
}

.tab:hover {
    background-color: rgba(41, 121, 255, 0.1);
}

.tab.active {
    background-color: transparent;
    border-bottom: 3px solid #2979FF;
    border-radius: 0px;
    font-weight: 600;
}

.tab-content {
    padding-inline: 1.5rem;
    padding-block-start: 1.2rem;
    margin-bottom: 2rem;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Overview Tab */
.etf-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid */
    gap: 1.5rem;
}

.overview-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.overview-label {
    color: #B0B0B0;
    font-weight: 500;
    font-size: 0.95rem;
}

.overview-value {
    color: #FFFFFF;
    font-weight: 500;
    font-size: 0.95rem;
}

.tradingview-container {
    position: relative;
    padding: 0rem;
    height: 40vh;
    width: 100%;
}

.tradingview-wrapper {
    position: relative;
    height: 100%;
    width: 100%;
}

/* TradingView Widget Specific Styles */
.tradingview-widget-container {
    height: 100%;
    width: 100%;
}

.tradingview-widget-copyright {
    display: none;
}

/* Composition Tab */
.composition-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid */
    gap: 2rem;
}

.composition-section {
    flex: 1; /* Keep flex for now, might adjust later if needed */
}

.composition-section h3 {
    margin-bottom: 1rem;
    color: #FFFFFF;
    font-size: 1.5rem;
}

.composition-chart-container {
    height: 200px; /* Fixed height for composition charts */
    margin-bottom: 1rem;
}

.composition-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.composition-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.composition-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 0.75rem;
}

.composition-name {
    color: #B0B0B0;
    font-size: 0.95rem;
    margin-right: auto; /* Pushes the value to the right */
}

.composition-value {
    color: #FFFFFF;
    font-weight: 500;
    font-size: 0.95rem;
}

/* Performance Tab */
.performance-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.performance-section {
    background: rgba(255, 255, 255, 0.10);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 1.5rem;
}

.performance-section h3 {
    margin-bottom: 1.5rem;
    color: #FFFFFF;
    font-size: 1.5rem;
    text-align: center;
}

.performance-table {
    width: 100%;
}

.performance-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.performance-header {
    font-weight: bold;
}

.performance-cell {
    color: #B0B0B0;
    font-size: 0.95rem;
}

.performance-cell:first-child {
    font-weight: 500;
    color: #FFFFFF;
}

/* Calculator Section - Adjust for consistent width and centering */
.etf-calculator-section {
    width: 100%;
    padding: 4rem 0;
}

.plan-calculators {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    align-items: stretch;
}

.plan-box {
    display: flex;
    flex-direction: column;
    min-width: 340px;
    max-width: 100%;
    margin: 0;
    padding: 0;
    flex: 1 1 400px;
}

.plan-box h3 {
    text-align: center;
    color: #2979FF;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Input and button container */
.plan-input-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.plan-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #B0B0B0;
    font-size: 0.95rem;
}
.plan-result {
    margin-bottom: 1.5rem; /* Add space between result and chart */
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.plan-result-label {
    color: #B0B0B0;
    font-size: 0.95rem;
}

.plan-result-value {
    color: #27AE60;
    font-size: 1.5rem;
    font-weight: 700;
}

.plan-result-sub {
     color: #B0B0B0;
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

.plan-chart-area {
    width: 100%;
    height: 340px;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(41,121,255,0.07);
}

#dark-plan-chart, #dark-withdraw-chart {
    width: 100% !important;
    height: 100% !important;
}

.broker-section {
    width: 100%;
    padding: 4rem 0;
}

.broker-section > .container,
.faq-section > .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
    width: 100%;
    box-sizing: border-box;
}

/* Broker table styles */

/* Größere Logos für Scalable, finanzen.net und Fidelity */
.broker-logo-column img[src*="scalable"],
.broker-logo-column img[src*="finanzennet"],
.broker-logo-column img[src*="fidelity"] {
    height: 44px;
    min-height: 38px;
    max-height: 52px;
    width: auto;
    max-width: 110px;
    object-fit: contain;
    background: #fff;
    border-radius: 6px;
    padding: 4px 8px;
    margin: 0;
    display: block;
    box-shadow: 0 2px 8px rgba(41,121,255,0.07);
    text-align: left;
}


/* Additional styles for the second calculator section */
.etf-calculator-section + .etf-calculator-section {
    margin-top: 3rem;
}

/* Broker CTA: Immer weiß, kein Hovereffekt */
.broker-cta {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #fff !important;
    color: #2979FF !important;
    border-radius: 6px;
    font-weight: 700;
    border: none;
    font-size: 1.05rem;
    box-shadow: 0 4px 16px rgba(41,121,255,0.13);
    letter-spacing: 0.03em;
    text-align: center;
    cursor: pointer;
    margin: 0.2rem 0;
    transition: none !important;
    text-decoration: none !important;
}

.broker-cta:hover,
.broker-cta:focus,
.broker-cta:active {
    background: #2979FF !important;
    color: #fff !important;
    text-decoration: none !important;
}

.broker-container {
    width: 90%; /* Match other sections */
    max-width: 1400px; /* Match other sections */
    margin: 0 auto;
    padding: 0 1rem;
}

.broker-container h3 {
    text-align: left;
    margin-bottom: 2rem;
    color: #FFFFFF;
    font-size: 2rem;
}

.broker-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #1d2540;
    border-radius: 12px;
    overflow: hidden; /* Ensures rounded corners on table */
}

.broker-table-header,
.broker-table-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    align-items: end; /* Align items to the bottom */
    min-height: 80px; /* Ensure consistent row height */
}

.broker-column.broker-logo-column {
    display: flex;
    justify-content: flex-start; /* Left-align card */
    align-items: center;       /* Vertically center card in the cell */
}

.broker-column.broker-logo-column img {
    background-color: #ffffff; /* White background for the card */
    padding: 8px;              /* Space around the logo inside the card */
    border-radius: 8px;        /* Rounded corners for the card */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Shadow for depth */
    
    height: 2.25rem; /* Consistent and responsive card height (e.g., 36px if root font-size is 16px) */
    /* width: auto; /* Let width be determined by content or set fixed if needed */
    max-width: 100%; /* Ensure card doesn't overflow its column */
    
    object-fit: contain; /* Scales original image to fit within the padding box, preserving aspect ratio */
    box-sizing: border-box; /* Ensures padding is included in height calculation */
    display: block; /* Ensures proper box model behavior */
}

.broker-table-header {
    background-color: rgba(41, 121, 255, 0.1);
    font-weight: bold;
    color: #2979FF;
}

.broker-table,
.broker-table-header,
.broker-table-row,
.broker-column {
    color: #fff !important;
}

.broker-table-header .broker-column {
    color: #2979FF !important;
    font-weight: bold;
}





.broker-table-row:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.broker-column {
    color: #B0B0B0;
    font-size: 0.95rem;
}

.broker-table-header .broker-column {
    color: #2979FF;
}

.broker-logo-column {
    display: flex;
    align-items: center;
}

.broker-logo-column img {
    height: 35px; /* Increased from 25px */
    width: auto;
    max-width: 100%;
    margin-right: 10px;
    object-fit: contain;
}

/* Specific style for Scalable logo */
.broker-logo-column img[alt="Scalable Capital Logo"] {
    height: 40px; /* Slightly larger than other logos */
}





.plan-btn {
    display: block;
    width: 70%;
    padding: 0.7rem 0.7rem;
    align-self: center;
    background: #fff;
    color: #2979FF;
    border: none;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
    margin-bottom: 1.2rem;
    margin-top: 0.7rem;
    box-shadow: 0 4px 16px rgba(41,121,255,0.13);
    letter-spacing: 0.03em;
}

.plan-btn:hover {
    background: #2979FF;
    color: #fff;
    box-shadow: 0 8px 24px rgba(41,121,255,0.22);
}

/* Headings and text in calculator section */
.etf-calculator-section h2.section-title,
.etf-sparplan-section h2,
.etf-cards-section h2,
.broker-section h2,
.faq-section h2 {
    color: #fff;
    font-size: 2.1rem;
    margin-bottom: 0.8rem;
    margin-top: 0.5rem;
    text-align: center;
    letter-spacing: 0.01em;
}
.etf-calculator-section p {
    color: rgba(255,255,255,0.93);
    margin-bottom: 2.2rem;
    font-size: 1.08rem;
    text-align: center;
}
.plan-box h3 {
    text-align: center;
    color: #2979FF;
    font-size: 1.35rem;
    margin-bottom: 1.2rem;
    margin-top: 0.5rem;
    letter-spacing: 0.01em;
}
.plan-box {
    padding: 2.2rem 1.5rem 1.7rem 1.5rem;
    margin-bottom: 2.5rem;
    margin-top: 0.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.13);
}

/* Chart area in calculator section */
.plan-chart-area {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(41,121,255,0.07);
    margin-top: 1.3rem;
    margin-bottom: 0.3rem;
    height: 340px;
    padding: 0;
    overflow: hidden;
}

.plan-chart-area canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    background: transparent;
    margin: 0;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}


.calculator p, .plan-calculators p, .calculator h3, .plan-calculators h3 {
    color: #fff !important;
}

/* FAQ Section - Adjust for consistent width and centering */
.faq-section {
    width: 100%;
    padding: 0 0 4rem 0;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
    clear: both; /* Prevent overlapping */
}

@media (max-width: 900px) {
    .faq-section {
        padding: 0 0 1.5rem 0;
    }
}

.faq-container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0;
}

.faq-section h2 {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 0 2rem 0;
    padding: 0;
    color: #FFFFFF;
    font-size: 1.75rem;
    text-align: left;
}

.faq-item {
    border-radius: 12px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.faq-question {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    cursor: pointer;
    color: #FFFFFF;
    font-size: 1.1rem;
    font-weight: 600;
    justify-content: space-between;
}

.faq-question i {
    color: #2979FF;
    margin-right: 1rem;
}

.faq-question h3 {
    margin: 0;
    font-size: 1.1rem;
}

.fa-chevron-down {
    transition: transform 0.3s ease;
}

.faq-link {
    color: #2979FF;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.faq-link:hover {
    color: #2255CC;
    text-decoration: underline;
}

.faq-answer {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: #FFFFFF;
    font-size: 0.95rem;
    display: none;
    line-height: 1.6;
}

.faq-answer p {
    margin-bottom: 1rem;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-item .fa-chevron-down {
    color: #fff !important;
}
.faq-item.active .fa-chevron-down {
    transform: rotate(180deg);
}

/* Calculator modern input style */
.calculator input[type="number"],
.calculator input[type="text"],
.calculator input[type="email"],
.calculator input[type="password"] {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.calculator input[type="number"]:focus,
.calculator input[type="text"]:focus,
.calculator input[type="email"]:focus,
.calculator input[type="password"]:focus {
    border-color: rgba(255, 255, 255, 0.5);
    outline: none;
}

.calculator input[type="number"]::placeholder,
.calculator input[type="text"]::placeholder,
.calculator input[type="email"]::placeholder,
.calculator input[type="password"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    :root {
        --container-width: 70vw;
        --base-font-size: 1.1vw;
    }

    .etf-cards-grid,
    .tabs-container,
    .plan-calculators,
    .broker-container,
    .faq-container {
        width: 95%; /* Increase width on smaller screens */
        max-width: none; /* Remove max-width constraint */
        padding: 0 1rem;
    }
    
     .etf-cards h2,
     h2.etf-analysis-title,
     .etf-calculator-section h3,
     .broker-container h3,
     .faq-section h2 {
        width: 95%; /* Match container width */
        max-width: none; /* Remove max-width constraint */
        padding: 0 1rem;
     }

    .composition-container {
        flex-direction: column;
        gap: 1rem;
    }

    .broker-table-header,
    .broker-table-row {
        grid-template-columns: 1.2fr 0.8fr 0.8fr 1fr 1fr;
    }
}

@media (max-width: 900px) {
    :root {
        --container-width: 90vw;
        --base-font-size: 1.2vw;
    }

    .etf-cards {
        padding: 1.5rem 0;
    }

    .composition-container {
        gap: 1rem;
    }

    .etf-calculator-section, /* This style seems unused now */
    .faq-section {
        padding: 1.5rem 0; /* Adjust padding for mobile */
    }
    
    .faq-container {
         padding: 0 1rem; /* Keep inner padding */
    }

    .performance-section {
        padding: 1rem;
    }

    .etf-overview {
        grid-template-columns: 1fr;
        height: auto;
    }

     .etf-cards h2,
     h2.etf-analysis-title,
     .etf-calculator-section h3,
     .broker-container h3,
     .faq-section h2 {
        font-size: 1.5rem;
     }

    .plan-calculators {
        flex-direction: column;
        gap: 1.5rem;
        align-items: stretch;
    }
    
    .plan-box {
        width: 100%;
        min-width: unset;
        min-height: unset;
    }
    
    .plan-chart-area {
        height: 340px;
        padding: 0 8px;
    }
    .plan-chart-area canvas {
        height: 320px !important;
    }
    
    .etf-cards h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .etf-cards-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 Karten pro Zeile */
        gap: 1rem;
        width: 100%;
        max-width: var(--container-width);
        margin: 0 auto;
        box-sizing: border-box;
        padding-left: var(--spacing-unit);
        padding-right: var(--spacing-unit);
        overflow-x: hidden;
    }
    .etf-cards h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 600px) {
    :root {
        --container-width: 95vw;
        --base-font-size: 14px;
        --spacing-unit: 10px;
    }
    
    .etf-cards-grid {
        grid-template-columns: repeat(1, 1fr); /* 1 card per row on very small screens */
        gap: 0.8rem;
        padding: 0 0.5rem;
    }
    
    .etf-cards h2 {
        padding: 0 0.5rem;
        font-size: 1.35rem;
    }

    h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .etf-cards {
        padding: 1rem 0;
    }

    .etf-cards-grid {
        gap: 0.8rem;
        padding: 0 0.5rem;
    }

    .etf-card {
        padding: 1rem;
    }

    .etf-card h3 {
        font-size: 1.1rem;
    }

    .etf-info,
    .etf-region {
        font-size: 0.85rem;
    }

    .tabs {
        flex-direction: column;
    }

    .tab {
        padding: 0.8rem 1rem;
    }

    .tab.active {
        border-bottom: none;
        border-left: 3px solid #2979FF;
    }

    .tab-content {
        padding: 1rem;
    }

    .etf-overview {
        gap: 1rem;
    }

    .overview-item {
        padding: 0.5rem 0;
    }

    .overview-label,
    .overview-value {
        font-size: 0.9rem;
    }

    .chart-container {
        height: 30vh; /* Adjust chart height for smaller screens */
    }

     .etf-cards h2,
     h2.etf-analysis-title,
     .etf-calculator-section h3,
     .broker-container h3,
     .faq-section h2 {
        font-size: 1.5rem;
        padding: 0 0.5rem;
     }

    .composition-section h3,
    .performance-section h3,
    .etf-calculator-section h3, /* This style seems unused now */
    .broker-container h3 {
        font-size: 1.5rem;
    }

    .composition-list,
    .performance-table {
        font-size: 0.9rem;
    }

    .plan-calculators {
        flex-direction: column;
        gap: 1.5rem;
    }
     
    .plan-box {
        padding: 1.5rem;
    }

    .plan-box h3 {
        font-size: 1.3rem;
    }

    .plan-label-row,
    .plan-label-row label,
    .plan-label-row span,
    .plan-input,
    .plan-btn,
    .plan-result-label,
    .plan-result-value,
    .plan-result-sub {
        font-size: 0.95rem;
    }

    .plan-result-value {
        font-size: 1.3rem;
    }
}

@media (min-width: 1920px) {
    :root {
        --container-width: 1400px;
        --base-font-size: 16px; /* Or desired base font size for large screens */
    }

    .container,
    .etf-cards-grid,
    .tabs-container,
    .plan-calculators,
    .broker-container,
    .faq-container {
        max-width: 1400px;
        width: 100%; /* Ensure it doesn't exceed max-width */
        padding: 0;
    }

     .etf-cards h2,
     h2.etf-analysis-title,
     .etf-calculator-section h3,
     .broker-container h3,
     .faq-section h2 {
         max-width: 1400px;
         width: 100%; /* Ensure it doesn't exceed max-width */
         padding: 0;
     }
}

/* Styles for the scroll-to-top button */
#scrollToTopBtn {
    display: none; /* Hidden by default */
    position: fixed; /* Fixed position */
    bottom: 20px; /* Place at the bottom */
    right: 20px; /* Place at the right */
    z-index: 99; /* Ensure it's above other content */
    border: none; /* Remove borders */
    outline: none; /* Remove outline */
    background-color: rgba(41, 121, 255, 0.8); /* Blue background */
    color: white; /* White text */
    cursor: pointer; /* Add a mouse pointer on hover */
    padding: 15px; /* Some padding */
    border-radius: 10px; /* Rounded corners */
    font-size: 18px; /* Increase font size */
    transition: background-color 0.3s ease, opacity 0.5s ease; /* Smooth transition */
}

#scrollToTopBtn:hover {
    background-color: #2255CC; /* Darker blue on hover */
}

/* Add styles for the new structure of ETF cards */
/* These styles are integrated into the existing .etf-card and .etf-cards-grid rules above */

.primary-btn {
    padding: calc(var(--spacing-unit) * 0.8) calc(var(--spacing-unit) * 1.2);
    font-size: calc(var(--base-font-size) * 0.9);
    margin-top: calc(var(--spacing-unit) * 0.8);
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.7rem 1.2rem;
  color: #fff;
  text-decoration: none;
  background: transparent;
  transition: background 0.2s;
  border-radius: 0;
}
.dropdown-menu a:hover, .dropdown-menu a:focus {
  background: rgba(41, 121, 255, 0.15) !important;
  color: #fff !important;
}

/* Styles for paragraphs within main content sections to control their width */
p {
    width: 100%; /* Full width of parent */
    max-width: 1400px; /* Match container max-width */
    margin: 0.5rem 0 1.5rem 0; /* Remove auto margins */
    padding: 0; /* Remove padding */
    box-sizing: border-box;
    color: #B0B0B0;
    line-height: 1.6;
}

.etf-cards,
.plan-calculators,
.broker-container,
.faq-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
    box-sizing: border-box;
}

.etf-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: 0;
    padding: 0 0 2.2rem 0;
    align-items: stretch;
}


@media (max-width: 1200px) {
    .etf-cards,
    .etf-cards-grid,
    .tabs-container,
    .plan-calculators,
    .broker-container,
    .faq-container {
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 var(--spacing-unit);
        box-sizing: border-box;
    }
}

@media (max-width: 900px) {
    .etf-cards,
    .etf-cards-grid,
    .tabs-container,
    .plan-calculators,
    .broker-container,
    .faq-container {
        width: 100%;
        max-width: 100vw;
        margin: 0 auto;
        padding: 0 1rem;
        box-sizing: border-box;
    }
}

@media (max-width: 600px) {
    .etf-cards,
    .etf-cards-grid,
    .tabs-container,
    .plan-calculators,
    .broker-container,
    .faq-container {
        width: 100%;
        max-width: 100vw;
        margin: 0 auto;
        padding: 0 0.5rem;
        box-sizing: border-box;
    }
}

/* Glassmorphism für alle Hauptboxen */
.etf-card,
.plan-box,
.performance-section,
.tabs-container,
.faq-item,
.broker-table {
    background: rgba(255, 255, 255, 0.10) !important;
    border-radius: 15px !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

/* --- NEW CALCULATOR SECTION STYLES --- */
/* Remove .header styles if not used */
/* .header, .header h1, .header p { ... } */

/* Ensure calculators section matches other main boxes */
.etf-calculator-section > .container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
    width: 100%;
    box-sizing: border-box;
}

.calculators {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.calculate-button {
    background: linear-gradient(135deg, #2979FF 0%, #1E88E5 100%);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 1rem 0;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(41, 121, 255, 0.3);
}

.calculate-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(41, 121, 255, 0.4);
    background: linear-gradient(135deg, #1E88E5 0%, #1976D2 100%);
}

.calculate-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(41, 121, 255, 0.3);
}

.calculator-box {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 2rem;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.calculator-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.calculator-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.calculator-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #ffffff;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.input-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #2979FF;
    box-shadow: 0 0 0 2px rgba(41, 121, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.result {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.result h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
    color: #4CAF50;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    margin-top: 1rem;
}

.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
}

@media (max-width: 768px) {
    .calculators {
        grid-template-columns: 1fr;
    }
    
    .etf-calculator-section > .container {
        max-width: 100vw;
        padding-left: 0;
        padding-right: 0;
    }
    .calculator-box {
        padding: 1.5rem;
    }
    
    .stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .chart-container {
        height: 250px;
    }
}

/* --- END NEW CALCULATOR SECTION STYLES --- */

/* Clean, production-ready chart styles */
.chart-container canvas {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 200px;
    min-width: 200px;
    background: transparent;
    box-sizing: border-box;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    min-height: 200px;
    min-width: 200px;
    margin-top: 1rem;
    background: transparent;
    z-index: 1;
}

/* Remove custom mobile box padding for .calculator-box, .etf-card, .tabs-container */
/* Use .container for spacing, as in styles.css */

@media (max-width: 900px) {
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    .calculator-box,
    .etf-card,
    .tabs-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .calculators {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* --- Fix mobile layout and box padding to match index.html --- */
@media (max-width: 900px) {
    html, body {
        max-width: 100vw;
        overflow-x: hidden;
    }
    .container {
        max-width: 100vw !important;
        box-sizing: border-box;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    .calculators {
        grid-template-columns: 1fr !important;
        gap: 1.2rem !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .calculator-box {
        padding: 2rem 1.2rem !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .etf-card,
    .tabs-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}
/* --- End mobile layout fix --- */

/* Harmonize section paddings for all main sections */
.etf-cards-section.gradient-section,
.etf-calculator-section.gradient-section,
.broker-section.gradient-section,
.faq-section.gradient-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #1D2540 0%, #2979FF 100%) !important;
}

/* Remove any redundant margin/padding from .etf-cards-section */
.etf-cards-section {
    margin: 0;
    padding: 0;
    background: none;
}

/* Keep spacing only between .tabs-container and .faq-section */
.tabs-container {
    margin-bottom: 3rem;
}