/* Reset and Base Styles */
html,
body,
ul {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden; /* Prevent horizontal scrolling globally */
}

h2, h3, h4, h5, h6 {	
    margin-top: 0;
    text-align: center;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Account for fixed header + buffer */
}

/* Responsive scroll padding for mobile */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 60px; /* Less padding on mobile */
    }
}
/* primary color old #2563eb */
:root {
    --primary-color: #3460bf;
    --primary-dark: #1d4ed8;
    --secondary-color: #f8fafc;
    --accent-color: #1b5c46;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --text-link: #3a3a3a;
    --border-color: #e5e7eb;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --border-radius-large: 25px;
    --border-radius-large-button: 50px;
    --transition: all 0.3s ease;
    --modal-header-height: 150px;

    /* header height */
    --header-height: 72px;

    /* Heading Variables */
    --h1-size: 3rem;
    --h2-size: 2rem;
    --h3-size: 1.5rem;
    --h4-size: 1.25rem;
    --heading-weight: 700;
    --heading-color: var(--text-color);
    --heading-margin-bottom: 3rem;
    --heading-line-height: 1.2;
}

/* Responsive Heading Variables */
@media (max-width: 768px) {
    :root {
        --h1-size: 2.5rem;
        --h2-size: 1.8rem;
        --h3-size: 1.25rem;
        --h4-size: 1.125rem;
        --heading-margin-bottom: 2.5rem;
    }
}

@media (max-width: 480px) {
    :root {
        --h1-size: 2rem;
        --h2-size: 1.5rem;
        --h3-size: 1.25rem;
        --h4-size: 1rem;
        --heading-margin-bottom: 2rem;
    }
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-link);
    background-color: var(--white);
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

a.internal-link {
    font-weight: 600;
    color: var(--text-link);
}

a.internal-link.white {
    text-decoration: underline;
    color: var(--white);
}

.overview-card-link {
    text-decoration: underline;
    color: inherit;
    transition: color 0.2s ease-in-out;
}

.overview-card-link:hover {
    color: var(--primary-color);
}

h2 {
    font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont,
        "Roboto", sans-serif;
    font-size: var(--h2-size);
    font-weight: var(--heading-weight);
    color: var(--heading-color);
    margin-bottom: var(--heading-margin-bottom);
    line-height: var(--heading-line-height);
    text-align: center;
    letter-spacing: -0.025em;
}

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

/* Header Styles */
.header {
    background: var(--white);
    box-shadow: 0 4px 6px -1px rgb(171 170 170 / 68%);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav {
    padding: 0.5rem 0;
}

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

.nav-brand a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.nav-brand a:hover {
    opacity: 0.8;
}

.nav-brand h1 {
    color: #404247;
    font-size: 1.5rem;
    font-weight: 700;
}

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

.nav-menu a {
    font-size: 1.2rem;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    margin-top: 2px;
    padding: 0.5rem;
    z-index: 1001;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* X Animation für Nav-Toggle */
.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

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

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


/* Scroll-to-Top Button */
#scrollToTopBtn {
    display: none; /* Hidden by default */
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
    border: 1px solid #e4e4e5;
    outline: none;
    background-color:white;
    color: #909093;
    cursor: pointer;
    padding: 10px;
    border-radius: 15px;
    font-size: 18px;
    opacity: 0.7;
    box-shadow: 5px 5px 8px -6px #bebcbc;
    transition: opacity 0.3s, background-color 0.3s, bottom 0.3s;
}

#scrollToTopBtn:hover {
    opacity: 1;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Hero Section */
.hero {
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--primary-dark)
    );
    background: linear-gradient(135deg, var(--primary-color) 0%, #6d97c1 100%);
    color: var(--white);
    padding: 4rem 0 6rem;
    margin-top: var(--header-height);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* =================================
   Global Button Styles
   ================================= */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    line-height: 1.2;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-color);
    color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-anbieter {
    display: inline-block;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--white);
    /* background: linear-gradient(135deg, #4661e5, #3a99ed); */
    background: linear-gradient(135deg, #4661e5, #5c98cd);
    border: none;
    border-radius: var(--border-radius-large);
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-anbieter:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #4661e5, #3a99ed);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.chart-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    background: none;
    padding: 0;
    margin: 0;
    width: 100%;
    min-height: 160px; /* Verhindert Layout Shift */
    aspect-ratio: 2.5 / 1; /* Responsive 2.5:1 Verhältnis */
    position: relative;
}

/* Loading-Indikator für Chart-Placeholder */
.chart-placeholder:empty::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: chartLoading 1s linear infinite;
}

@keyframes chartLoading {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

#tradingChart {
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transition: transform 0.3s ease;
    max-width: 100%;
    height: auto;
}

#tradingChart:hover {
    transform: scale(1.02);
}

@media (max-width: 768px) {
    #tradingChart:hover {
        transform: none; /* Deaktiviere Hover-Effekt auf mobilen Geräten */
    }

    .chart-placeholder {
        min-height: 140px; /* Angepasst für mobile Geräte */
        aspect-ratio: 2.2 / 1; /* Etwas kompakter auf mobile */
    }
}

@media (max-width: 480px) {
    .chart-placeholder {
        min-height: 120px; /* Minimale Höhe für sehr kleine Bildschirme */
        aspect-ratio: 2 / 1; /* Kompakteres Verhältnis */
    }
}

/* Animation für Canvas-Loading */
.chart-placeholder canvas {
    opacity: 0;
    animation: fadeInChart 1s ease-out 0.5s forwards;
}

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

/* Calculator Section */
.calculator-section {
    padding: 2rem 0;
    background: var(--secondary-color);
}

.calculator-section > .container > p {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-light);
    margin-top: 3rem;
}

.calculator {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}

.calculator-inputs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 600px) {
    .calculator-inputs {
        grid-template-columns: 1fr;
    }
}

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

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

.input-group input,
.input-group select {
    padding: 0.75rem;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.calculate-btn {
    display: block;
    width: 100%;
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
}

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

/* Comparison Section */
.comparison-section {
    padding: 3rem 0;
}

.rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.rating-line {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rating-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
    line-height: 1;
}

.rating-stars {
    display: flex;
    align-items: center;
    gap: 2px;
}

.rating .star {
    font-size: 14px;
    line-height: 1;
    color: #fbbf24;
}

.rating .star.full {
    color: #fbbf24;
}

.rating .star.half {
    color: #fbbf24;
}

.rating .star.empty {
    color: #e5e7eb;
}

.rating-count {
    font-size: 11px;
    color: var(--text-light);
    text-align: center;
    white-space: nowrap;
}

.table-note {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
}

/* Features Section */
.features-section {
    padding: 3rem 0;
    background: var(--secondary-color);
}

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

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

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

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.feature-card p {
    color: var(--text-light);
}

/* Guide Section */
.guide-section {
    padding: 3rem 0;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(2, 300px);
    width: fit-content;
    margin: auto;
    gap: 2rem;
}

.guide-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.guide-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.guide-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--primary-dark);
}

/* Footer */
.footer {
    background: var(--text-color);
    color: var(--white);
    padding: 3rem 0 1rem;
}

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

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--white);
    text-align: left;
}

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

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

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1rem;
    text-align: center;
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        gap: 0rem;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: var(--shadow);
        padding: 0.5rem;
        z-index: 1000;
        border-radius: 0 0 8px 8px;
    }

    .nav-menu.active {
        display: flex;
        animation: slideDown 0.3s ease;
    }

    .nav-menu .nav-item {
        margin: 0.25rem 0;
        border-radius: 4px;
        transition: background-color 0.2s ease;
        cursor: pointer;
    }

    .nav-menu .nav-item:hover {
        background-color: var(--secondary-color);
    }

    .nav-menu a {
        display: block;
        padding: 0.75rem 1rem;
        width: 100%;
        color: inherit;
    }

    .nav-menu .nav-item:hover a {
        color: var(--primary-color);
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 4rem 0 4rem;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .calculator-inputs {
        grid-template-columns: 1fr;
    }

    .calculator {
        padding: 1.5rem;
    }

    .modal-header .btn.cta-button.classic {
        display: none;
    }

    .modal-link-container {
        display: grid !important;
    }

    .broker-logo-modal {
        width: 90px;
        height: 60px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .guide-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    section {
        padding: 3rem 0;
    }

    .calculator {
        padding: 1rem;
    }
}

/* =================================
   Reusable CTA Section & Buttons
   ================================= */

.reusable-cta-section {
    background: linear-gradient(
        135deg,
        var(--primary-color) 0%,
        var(--secondary-color) 100%
    );
    padding: 1.5rem 3rem 3.5rem 3rem;
    text-align: center;
}

.reusable-cta-section h2 {
    color: var(--white);
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.reusable-cta-section p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn.cta-button {
    color: var(--text-link);
    background-color: var(--white);
    background: var(--white);
    border: 1px solid #e4e4e4;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-in-out;
    font-weight: 600;
    padding: 0.8rem 1.8rem;
    border-radius: 50px; /* Pill shape */
    text-decoration: none;
}

.btn.cta-button:hover {
    color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

.btn.cta-button.secondary {
    background-color: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.8);
}

.btn.cta-button.secondary:hover {
    background-color: var(--white);
    color: var(--primary-color);
    border-color: var(--white);
}

.btn.cta-button.classic {
    border: 1px solid #e4e4e4;
}

.btn.cta-button.classic:hover {
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.23);
}

/* =================================
   Breadcrumb Styles
   ================================= */
.breadcrumb {
    padding: 1rem 0;
    background: var(--secondary-color);
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

/* Modern CTA Buttons - Reusable Component */
.cta-buttons-section {
    text-align: center;
    padding: 3rem 0;
    background: var(--white);
}

.cta-buttons-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    max-width: 600px;
    margin: 0 auto;
}

.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--text-color);
    border-radius: var(--border-radius-large-button);
    background: var(--white);
    color: var(--text-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 180px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-modern:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Button variants */
.btn-modern.primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.btn-modern.primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
}

.btn-modern.accent {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--white);
}

.btn-modern.accent:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: var(--white);
}

/* CTA Section Layout */
.cta-section-title {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-weight: 700;
    text-align: center;
}

.cta-section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    text-align: center;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive Design für CTA Buttons */
@media (max-width: 768px) {
    .cta-buttons-container {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .btn-modern {
        width: 100%;
        max-width: 280px;
        padding: 1.25rem 2rem;
    }

    .cta-section-title {
        font-size: 1.3rem;
    }

    .cta-section-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .cta-buttons-section {
        padding: 2rem 0;
    }

    .btn-modern {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* Section CTA */
.section-cta,
.final-cta,
.overview-cta,
.guide-cta,
.ratgeber-cta,
.comparison-cta {
    padding: 4rem 0;
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
}

.section-cta h2,
.final-cta .cta-content h2,
.overview-cta .cta-content h2,
.guide-cta .cta-content h2,
.ratgeber-cta .cta-content h2,
.comparison-cta .cta-content h2 {
    font-size: var(--h1-size); /* Use responsive h1 size */
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--white); /* Explicitly set white for contrast */
}

.section-cta p,
.final-cta .cta-content p,
.overview-cta .cta-content p,
.guide-cta .cta-content p,
.ratgeber-cta .cta-content p,
.comparison-cta .cta-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Utility Classes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 0.25rem;
}
.mb-2 {
    margin-bottom: 0.5rem;
}
.mb-3 {
    margin-bottom: 1rem;
}
.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-1 {
    margin-top: 0.25rem;
}
.mt-2 {
    margin-top: 0.5rem;
}
.mt-3 {
    margin-top: 1rem;
}
.mt-4 {
    margin-top: 1.5rem;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Modal Styling */
#details-modal {
    display: none; /* Initially hidden */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fefefe;
    margin: 5dvh auto;
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    height: 90dvh;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: fadeIn 0.3s ease-in-out;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 0rem;
    right: 1.5rem;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
}

.modal-header {
    display: flex;
    align-items: center;
    padding: 2rem 2rem 1rem 2rem;
    border-bottom: 1px solid #e5e7eb;
    justify-content: space-between;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: var(--modal-header-height);
    box-sizing: border-box;
}

.modal-header-broker h2 {
    font-size: 1.5rem;
    margin: 0;
    text-align: left;
}

.broker-logo-modal {
    width: 100px;
    height: 80px;
    object-fit: contain;
}
.broker-rating {
    display: flex;

    align-items: center;
    gap: 2rem;
}

.modal-title-container {
    flex: 1;
}

.modal-title-container h2 {
    margin: 0;
    font-size: 1.75rem;
    color: #1f2937;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem 2rem 2rem;
    position: relative;
}

/* Modal Scroll-Indikator */
.modal-scroll-wrapper {
    position: relative;
    height: 100%;
}

.modal-scroll-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(
        to top,
        rgba(255, 255, 255, 0.9),
        rgba(255, 255, 255, 0)
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

/* Oberer Modal Scroll-Indikator */
.modal-scroll-indicator-top {
    position: absolute;
    top: var(--modal-header-height);
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.9),
        rgba(255, 255, 255, 0)
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

/* Zeige Modal Scroll-Indikator wenn scrollbar vorhanden und nicht am Ende */
.modal-body.scrollable ~ .modal-scroll-indicator {
    opacity: 1;
}

.modal-body.scrolled-to-end ~ .modal-scroll-indicator {
    opacity: 0;
}

/* Zeige oberen Modal Scroll-Indikator wenn gescrollt und nicht am Anfang */
.modal-body.scrolled ~ .modal-scroll-indicator-top {
    opacity: 1;
}

.modal-body.scrolled-to-start ~ .modal-scroll-indicator-top {
    opacity: 0;
}

.modal-link-container {
    padding: 1.5rem 0;
    display: none;
    justify-items: center;
}

.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section h3 {
    font-size: 1.125rem;
    color: #374151;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 0.5rem;
}

.modal-section ul {
    list-style: none;
    padding: 0;
}

.modal-section li {
    text-align: left;
    padding: 0.5rem 0;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
}

/* Special styling for transaction cost item */
.transaction-cost-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.transaction-cost-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.transaction-cost-amount {
    font-weight: 600;
    color: #374151;
}

.transaction-cost-breakdown {
    margin-top: 0.25rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.tax-info li {
    justify-content: flex-start;
    align-items: center;
    gap: 0.75rem;
}

.flag-icon {
    width: 20px;
    height: auto;
}

.tax-status {
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    font-size: 0.8rem;
}

.tax-status.simple {
    background-color: #dcfce7;
    color: #166534;
}

.tax-status.not-simple {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Table cell styling for new structure */
.fee-detail {
    text-align: right;
    font-weight: 500;
    color: #374151;
}

.tax-cell {
    text-align: center;
}

.tax-cell .tax-status {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    display: inline-block;
}

.rating-cell {
    text-align: center;
}

.rating-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.rating-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

/* Tax countries styling */
.tax-countries {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: center;
}

.tax-country {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
}

.flag-mini {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
}

/* Rating info styling */
.rating-main {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    justify-content: center;
}

.rating-count {
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
    margin-top: 0.25rem;
}

.features-list li {
    justify-content: flex-start;
    padding: 0.4rem 0;
    color: #4b5563;
    gap: 0.5rem;
    text-align: left;
}

.features-list li::before {
    content: "✓";
    color: #22c55e;
    margin-right: 0.75rem;
    font-weight: bold;
}

.modal-details {
    text-align: center;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #4661e5, #3a99ed);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius-large-button);
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cta-button:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Account info styling */
.account-info {
    text-align: center;
    padding: 0.5rem;
}

.account-fee {
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.interest-rate {
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 8px;
    font-weight: 500;
    background-color: #f3f4f6;
    color: #6b7280;
    display: inline-block;
    width: fit-content;
}

/* Green styling for positive interest rates */
.interest-rate:not([data-no-interest]) {
    background-color: #dcfce7;
    color: #166534;
}

/* Legal Pages Styles */
.legal-page {
    padding: 90px 0 20px;
    min-height: 100dvh;
    background-color: #f8fafc;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.legal-content h1 {
    color: #3a3f45;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    font-size: 1.7rem;
    font-weight: 600;
}

.legal-content h2 {
    color: #374151;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: left;
}

.legal-content h3 {
    color: #4b5563;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: left;
}

.legal-content p {
    line-height: 1.6;
    margin-bottom: 1rem;
    color: #374151;
}

.legal-content ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.legal-section {
    margin-bottom: 2rem;
}

/* Hide legal content from search engines */
.no-index {
    user-select: none;
}

.no-index::before {
    content: "";
    position: absolute;
    left: -9999px;
    top: -9999px;
}

/* Cookie Popup Styles */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    z-index: 10000;
    padding: 1.5rem;
    border-top: 1px solid rgba(229, 231, 235, 0.6);
    box-shadow: 0 -12px 32px -8px rgba(0, 0, 0, 0.08),
        0 -6px 16px -4px rgba(0, 0, 0, 0.04), 0 -1px 3px 0 rgba(0, 0, 0, 0.05);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-popup-show {
    transform: translateY(0) !important;
}

.cookie-popup-hide {
    transform: translateY(100%) !important;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    color: #4b5563;
}

.cookie-text h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
}

.cookie-text p {
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.85;
    margin: 0;
    max-width: 600px;
    color: #6b7280;
}

.cookie-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.cookie-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(79, 70, 229, 0.3);
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    background: rgba(79, 70, 229, 0.05);
}

.cookie-link:hover {
    background: rgba(79, 70, 229, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px -2px rgba(79, 70, 229, 0.2);
}

.cookie-accept-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px -2px rgba(52, 96, 191, 0.3),
        0 2px 4px -1px rgba(52, 96, 191, 0.2);
}

.cookie-accept-btn:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px -2px rgba(16, 185, 129, 0.4),
        0 4px 8px -2px rgba(16, 185, 129, 0.3);
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .cookie-popup {
        padding: 1rem;
    }

    .cookie-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
        text-align: center;
    }

    .cookie-text h4 {
        font-size: 1.1rem;
    }

    .cookie-text p {
        font-size: 0.9rem;
        max-width: none;
    }

    .cookie-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .cookie-link,
    .cookie-accept-btn {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .cookie-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .cookie-link,
    .cookie-accept-btn {
        width: 100%;
        font-size: 0.9rem;
    }
}

/* Filter Section Styles */
.filter-section {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 2rem;
}

.filter-section h3 {
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.filter-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.filter-title {
    font-weight: 600;
    color: var(--text-color);
    font-size: 1rem;
}

.filter-checkboxes {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-color);
    transition: var(--transition);
    user-select: none;
}

.filter-checkbox:hover {
    color: var(--primary-color);
}

.filter-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    height: 18px;
    width: 18px;
    background-color: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 3px;
    position: relative;
    transition: var(--transition);
}

.filter-checkbox:hover input ~ .checkmark {
    border-color: var(--primary-color);
}

.filter-checkbox input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filter-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.filter-checkbox .flag-icon {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    object-fit: cover;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .filter-section {
        padding: 1rem;
        margin-top: 1.5rem;
    }

    .filter-checkboxes {
        gap: 1rem;
    }

    .filter-checkbox {
        font-size: 0.9rem;
    }
}

/* ===== COUNTRY SWITCHER ===== */

/* Compact Country Switcher for Navigation */
.country-switcher-compact {
    position: relative;
    display: inline-block;
}

.country-flag-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.current-country-flag {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 2px;
}

/* Country flag button styling - inherits from nav-link */
.nav-link.country-flag-btn {
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
}

.nav-link.country-flag-btn:hover {
    color: var(--primary-color); /* Match nav-link hover */
    background: none;
}

/* Desktop navigation styling */
@media (min-width: 768px) {
    .nav-menu {
        align-items: center;
    }
    .nav-link.country-flag-btn .country-text {
        display: none; /* Hide text on desktop */
    }
    
    .nav-link.country-flag-btn .current-country-flag {
        width: 24px;
        height: 18px;
        object-fit: cover;
        border-radius: 2px;
    }
}

/* Mobile navigation styling */
@media (max-width: 1024px) {
    .nav-link.country-flag-btn {
        justify-content: space-between;
        padding: 1rem;
        width: 100%;
        /* Keep the inherited nav-link font styling */
    }
    
    .nav-link.country-flag-btn:hover {
        background: var(--secondary-color);
        color: var(--primary-color);
    }
    
    .nav-link.country-flag-btn .country-text {
        /* Inherits font-size: 1.2rem, font-weight: 500 from nav-link */
        color: inherit;
    }
    
    .nav-link.country-flag-btn .current-country-flag {
        width: 24px;
        height: 18px;
        object-fit: cover;
        border-radius: 2px;
    }
}

/* Country Dropdown Overlay - Full Screen Modal */
.country-dropdown {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.country-dropdown.show {
    opacity: 1;
    visibility: visible;
}

.country-dropdown-content {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    max-width: 400px;
    transform: scale(0.9) translateY(-20px);
    transition: all 0.3s ease;
}

.country-dropdown.show .country-dropdown-content {
    transform: scale(1) translateY(0);
}

.country-dropdown-header {
    padding: 0.75rem 1rem;
    background: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-color);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.country-dropdown-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-color) !important;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-color);
}

.country-dropdown-option:last-child {
    border-bottom: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.country-dropdown-option:hover {
    background: var(--secondary-color);
    color: var(--primary-color) !important;
}

.country-dropdown-option.active {
    background: var(--primary-color);
    color: white !important;
    font-weight: 600;
}

.country-dropdown-option .flag-icon {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
}

.current-indicator {
    margin-left: auto;
    font-weight: bold;
    color: inherit;
}

/* Full Country Switcher for Footer/Content */
.country-switcher {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--secondary-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

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

.country-switcher-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.country-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.country-option:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.country-option.active {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.country-option .flag-icon {
    width: 20px;
    height: 15px;
    object-fit: cover;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .country-dropdown-content {
        min-width: 280px;
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    .country-dropdown-option:hover {
        background: white;
        color: var(--text-color);
    }
    
    .country-dropdown-option.active {
        background: var(--primary-color);
        color: white;
        font-weight: 600;
    }
    
    .country-dropdown-option.active:hover, .country-dropdown-option.active:hover > a {
        background: var(--primary-color);
        color: white !important;
    }
    

    
    /* Ensure proper spacing between elements */
    .country-dropdown-option {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .country-dropdown-option .flag-icon {
        width: 20px;
        height: 15px;
        margin-right: 0.5rem;
    }
    
    .country-dropdown-option span {
        flex: 1;
    }
    
    .country-dropdown-option .current-indicator {
        margin-left: 0.5rem;
        font-weight: bold;
        color: inherit;
    }
    
    .country-switcher-options {
        flex-direction: column;
    }
    
    .country-option {
        justify-content: center;
    }
}


