/* ==========================================================================
   Running in Germany - Modern One-Pager Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
    /* Colors */
    --color-primary: #FF6B35;
    --color-primary-dark: #E55A2B;
    --color-primary-light: #FF8A5C;
    --color-secondary: #2D3436;
    --color-secondary-light: #3D4446;
    --color-accent: #F5F6FA;
    --color-white: #FFFFFF;
    --color-text: #2D3436;
    --color-text-light: #636E72;
    --color-border: #DFE6E9;

    /* Typography */
    --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-xxl: 5rem;

    /* Sizing */
    --container-max: 1200px;
    --container-narrow: 800px;

    /* Effects */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --transition: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-secondary);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    margin-bottom: var(--space-md);
}

h3 {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
}

p {
    margin-bottom: var(--space-sm);
}

.lead {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--color-text);
}

strong {
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-narrow {
    max-width: var(--container-narrow);
}

.section {
    padding: var(--space-xl) 0;
}

@media (min-width: 768px) {
    .section {
        padding: var(--space-xxl) 0;
    }
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: background var(--transition);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: auto;
    width: 320px;
    max-width: 100%;
    transition: opacity 0.2s ease;
}

.logo:hover img {
    opacity: 0.85;
}

@media (max-width: 768px) {
    .logo img {
        width: 180px;
    }
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: none;
    list-style: none;
    gap: var(--space-lg);
}

.nav-menu a {
    font-weight: 500;
    color: var(--color-secondary);
    padding: var(--space-xs) 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition);
}

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

.nav-menu a:hover::after {
    width: 100%;
}

/* Dropdown Menu */
.has-dropdown {
    position: relative;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dropdown-arrow {
    font-size: 0.6rem;
    transition: transform var(--transition);
}

.has-dropdown:hover .dropdown-arrow,
.has-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: var(--space-xs) 0;
    list-style: none;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-bottom-color: var(--color-white);
    border-top: 0;
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown.active .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
}

.dropdown-menu li {
    border-bottom: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.9rem;
    transition: background var(--transition), color var(--transition);
}

.dropdown-menu a::after {
    display: none;
}

.dropdown-menu a:hover {
    background: var(--color-accent);
    color: var(--color-primary);
    text-decoration: none;
}

.dropdown-menu li:first-child a {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.dropdown-menu li:last-child a {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* Mobile Menu Toggle */
.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-secondary);
    transition: all var(--transition);
}

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

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

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

/* Mobile Menu */
@media (max-width: 767px) {
    .nav-menu {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--color-white);
        flex-direction: column;
        padding: var(--space-md);
        gap: 0;
        box-shadow: var(--shadow-md);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu > li {
        border-bottom: 1px solid var(--color-border);
    }

    .nav-menu > li > a {
        display: block;
        padding: var(--space-sm) 0;
    }

    /* Mobile Dropdown */
    .has-dropdown {
        position: relative;
    }

    .dropdown-menu {
        position: static;
        transform: none;
        min-width: 100%;
        box-shadow: none;
        padding: 0;
        background: var(--color-accent);
        border-radius: var(--radius-sm);
        margin: var(--space-xs) 0;
    }

    .dropdown-menu::before {
        display: none;
    }

    .dropdown-menu a {
        padding: 0.6rem 1rem;
        font-size: 0.875rem;
    }

    .dropdown-menu li:first-child a,
    .dropdown-menu li:last-child a {
        border-radius: 0;
    }

    .has-dropdown.active .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
    }
}

@media (min-width: 768px) {
    .nav-menu {
        display: flex;
    }

    .nav-toggle {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        135deg,
        rgba(45, 52, 54, 0.85) 0%,
        rgba(45, 52, 54, 0.6) 50%,
        rgba(255, 107, 53, 0.4) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: var(--space-xl) var(--space-md);
    max-width: 900px;
}

.hero-content h1 {
    color: var(--color-white);
    margin-bottom: var(--space-md);
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-lg);
}

/* Button */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    color: var(--color-white);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

/* --------------------------------------------------------------------------
   Hero Buttons
   -------------------------------------------------------------------------- */
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
}

.btn-secondary {
    background: transparent;
    color: var(--color-white);
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--color-white);
    border-color: var(--color-white);
    text-decoration: none;
    transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Quiz Section
   -------------------------------------------------------------------------- */
.quiz {
    background: var(--color-accent);
    padding: var(--space-xl) 0;
}

.quiz-container {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
    text-align: center;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.quiz-screen {
    animation: quizFadeIn 0.3s ease;
}

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

.quiz-screen[hidden] {
    display: none;
}

/* Quiz Start Screen */
.quiz-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--space-md);
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.quiz-start h2 {
    margin-bottom: var(--space-sm);
}

.quiz-start p {
    color: var(--color-text-light);
    margin-bottom: var(--space-lg);
}

/* Quiz Progress Dots */
.quiz-progress {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-border);
    transition: all var(--transition);
}

.progress-dot.active {
    background: var(--color-primary);
    transform: scale(1.2);
}

.progress-dot.completed {
    background: var(--color-primary);
}

/* Quiz Questions */
.quiz-question h3 {
    margin-top: 0;
    margin-bottom: var(--space-lg);
    color: var(--color-secondary);
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    max-width: 500px;
    margin: 0 auto;
}

.quiz-option {
    padding: var(--space-md) var(--space-lg);
    background: var(--color-white);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    transition: all var(--transition);
    text-align: left;
}

.quiz-option:hover {
    border-color: var(--color-primary);
    background: rgba(255, 107, 53, 0.05);
    transform: translateX(5px);
}

.quiz-option:active,
.quiz-option.selected {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: var(--color-white);
}

/* Quiz Result */
.quiz-result-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--color-white);
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 20px;
    margin-bottom: var(--space-md);
}

.quiz-result h3 {
    margin-top: 0;
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
}

.quiz-result p {
    color: var(--color-text-light);
    margin-bottom: var(--space-lg);
}

.quiz-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
}

.btn-outline {
    background: transparent;
    color: var(--color-text-light);
    border: 2px solid var(--color-border);
    box-shadow: none;
}

.btn-outline:hover {
    border-color: var(--color-text-light);
    color: var(--color-text);
    background: var(--color-accent);
    text-decoration: none;
}

/* Quiz Responsive */
@media (min-width: 768px) {
    .quiz-container {
        padding: var(--space-xxl);
        min-height: 380px;
    }

    .quiz-icon {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
}

/* --------------------------------------------------------------------------
   Intro Section
   -------------------------------------------------------------------------- */
.intro {
    padding-top: var(--space-xxl);
}

/* --------------------------------------------------------------------------
   Table of Contents
   -------------------------------------------------------------------------- */
.toc {
    background: var(--color-accent);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--color-primary);
}

.toc h2 {
    font-size: 1.25rem;
    margin-bottom: var(--space-md);
}

.toc ol {
    list-style-position: inside;
    color: var(--color-text-light);
}

.toc li {
    padding: var(--space-xs) 0;
}

.toc a {
    color: var(--color-text);
}

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

/* --------------------------------------------------------------------------
   Marathon Cards
   -------------------------------------------------------------------------- */
.marathons {
    padding: 0;
}

.marathon-card {
    padding: var(--space-xxl) 0;
    background: var(--color-white);
}

.marathon-card-alt {
    background: var(--color-accent);
}

.marathon-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.marathon-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 50px;
    background: var(--color-primary);
    color: var(--color-white);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    border-radius: 50%;
    flex-shrink: 0;
}

.marathon-header h2 {
    margin-bottom: 0;
}

/* Marathon Image */
.marathon-image {
    margin-bottom: var(--space-lg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.marathon-image img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.marathon-image:hover img {
    transform: scale(1.02);
}

.marathon-image figcaption {
    background: var(--color-secondary);
    color: var(--color-white);
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
    font-style: italic;
}

/* Marathon Layout - Two Column on Desktop */
.marathon-layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

@media (min-width: 992px) {
    .marathon-layout {
        display: grid;
        grid-template-columns: 1fr 320px;
        gap: var(--space-xl);
        align-items: start;
    }
}

/* Marathon Content */
.marathon-content {
    max-width: var(--container-narrow);
}

/* Marathon Sidebar */
.marathon-sidebar {
    order: -1; /* Show first on mobile */
}

@media (min-width: 992px) {
    .marathon-sidebar {
        order: 0;
        position: sticky;
        top: 90px; /* Header height + spacing */
    }
}

/* Facts Box in Sidebar */
.facts-box {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
}

.marathon-card-alt .facts-box {
    background: var(--color-white);
}

.facts-box h3 {
    margin-top: 0;
    margin-bottom: var(--space-md);
    color: var(--color-primary);
    font-size: 1.125rem;
    text-align: center;
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-primary);
}

.facts-box .facts-grid {
    margin: 0;
}

@media (min-width: 992px) {
    .facts-box .facts-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .facts-box .fact {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
        padding: var(--space-sm);
    }

    .facts-box .fact-label {
        margin-bottom: 0;
    }

    .facts-box .fact-value {
        font-size: 1rem;
    }
}

/* Facts Grid */
.facts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    margin: var(--space-md) 0;
}

@media (min-width: 600px) {
    .facts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.fact {
    background: var(--color-white);
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.marathon-card-alt .fact {
    background: var(--color-white);
}

.fact-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-light);
    margin-bottom: var(--space-xs);
}

.fact-value {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* Ideal For Box */
.ideal-for {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--color-white);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-top: var(--space-lg);
}

.ideal-for strong {
    font-weight: 700;
}

.signup-info {
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: var(--color-accent);
    border-radius: var(--radius-md);
}

/* --------------------------------------------------------------------------
   Comparison Table
   -------------------------------------------------------------------------- */
.comparison {
    background: var(--color-secondary);
    color: var(--color-white);
}

.comparison h2 {
    color: var(--color-white);
    text-align: center;
    margin-bottom: var(--space-xl);
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.comparison-table,
.termine-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.comparison-table th,
.comparison-table td,
.termine-table th,
.termine-table td {
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    color: var(--color-text);
}

.comparison-table th,
.termine-table th {
    background: var(--color-primary);
    color: var(--color-white);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.comparison-table tr:nth-child(even),
.termine-table tr:nth-child(even) {
    background: var(--color-accent);
}

.comparison-table tr:hover,
.termine-table tr:hover {
    background: rgba(255, 107, 53, 0.1);
}

/* --------------------------------------------------------------------------
   FAQ Section
   -------------------------------------------------------------------------- */
.faq {
    background: var(--color-accent);
}

.faq h2 {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.faq-item {
    background: var(--color-white);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-sm);
}

.faq-item h3 {
    margin-top: 0;
    color: var(--color-primary);
}

.faq-item ul,
.faq-item ol {
    margin: var(--space-sm) 0;
    padding-left: var(--space-lg);
}

.faq-item li {
    margin-bottom: var(--space-xs);
}

/* --------------------------------------------------------------------------
   Termine Section
   -------------------------------------------------------------------------- */
.termine {
    background: var(--color-white);
}

.termine h2 {
    text-align: center;
    margin-bottom: var(--space-xl);
}

/* --------------------------------------------------------------------------
   Sources Section
   -------------------------------------------------------------------------- */
.sources {
    background: var(--color-accent);
}

.sources h2 {
    margin-bottom: var(--space-lg);
}

.sources-list {
    list-style: none;
    columns: 1;
}

@media (min-width: 600px) {
    .sources-list {
        columns: 2;
    }
}

.sources-list li {
    padding: var(--space-xs) 0;
    break-inside: avoid;
}

.update-info {
    margin-top: var(--space-lg);
    color: var(--color-text-light);
    font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   About Section
   -------------------------------------------------------------------------- */
.about {
    background: var(--color-white);
    text-align: center;
}

.about h2 {
    margin-bottom: var(--space-lg);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
    background: var(--color-secondary);
    color: rgba(255, 255, 255, 0.8);
    padding: var(--space-xl) 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    text-align: center;
}

@media (min-width: 600px) {
    .footer-content {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
}

.footer-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--color-white);
}

.footer-brand p {
    margin-top: var(--space-xs);
    margin-bottom: 0;
    font-size: 0.875rem;
}

.footer-nav {
    display: flex;
    gap: var(--space-lg);
}

.footer-nav a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

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

/* --------------------------------------------------------------------------
   Utility Classes
   -------------------------------------------------------------------------- */
.text-center {
    text-align: center;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --------------------------------------------------------------------------
   Print Styles
   -------------------------------------------------------------------------- */
@media print {
    .header,
    .hero,
    .nav-toggle,
    .btn {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    .section {
        padding: 1rem 0;
    }

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

    .marathon-card,
    .marathon-card-alt {
        break-inside: avoid;
    }
}

/* ==========================================================================
   Premium Design Enhancements
   ========================================================================== */

/* --------------------------------------------------------------------------
   Enhanced Hero
   -------------------------------------------------------------------------- */
.hero {
    min-height: 100svh; /* Better mobile support */
}

.hero-content h1 {
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .hero-subtitle {
        font-size: 1.5rem;
    }
}

/* Scroll indicator */
.hero::after {
    content: '';
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 25px;
    z-index: 4;
}

.hero::before {
    content: '';
    position: absolute;
    bottom: 42px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 10px;
    background: rgba(255,255,255,0.7);
    border-radius: 3px;
    z-index: 5;
    animation: scrollIndicator 2s ease-in-out infinite;
}

@keyframes scrollIndicator {
    0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.3; transform: translateX(-50%) translateY(10px); }
}

/* --------------------------------------------------------------------------
   Enhanced Typography
   -------------------------------------------------------------------------- */
.lead {
    font-size: clamp(1.125rem, 2.5vw, 1.375rem);
}

/* --------------------------------------------------------------------------
   Premium Marathon Cards
   -------------------------------------------------------------------------- */
.marathon-rank {
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    transition: transform var(--transition), box-shadow var(--transition);
}

.marathon-header:hover .marathon-rank {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

.marathon-image {
    position: relative;
}

.marathon-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.3));
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition);
}

.marathon-image:hover::before {
    opacity: 1;
}

/* Fixed aspect ratio for images */
.marathon-image img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Better facts grid on mobile */
@media (max-width: 599px) {
    .facts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .fact {
        padding: var(--space-sm) var(--space-xs);
    }

    .fact-value {
        font-size: 1rem;
    }
}

/* Gradient border for facts */
.fact {
    border: 1px solid transparent;
    background:
        linear-gradient(white, white) padding-box,
        linear-gradient(135deg, var(--color-primary-light), var(--color-primary)) border-box;
    transition: transform var(--transition), box-shadow var(--transition);
}

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

/* --------------------------------------------------------------------------
   Enhanced Tables
   -------------------------------------------------------------------------- */
.comparison-table a,
.termine-table a {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    position: relative;
    transition: color var(--transition);
}

.comparison-table a::after,
.termine-table a::after {
    content: ' →';
    opacity: 0;
    transition: opacity var(--transition);
}

.comparison-table a:hover,
.termine-table a:hover {
    color: var(--color-primary-dark);
}

.comparison-table a:hover::after,
.termine-table a:hover::after {
    opacity: 1;
}

.comparison-table td:first-child,
.termine-table td:first-child {
    font-weight: 500;
}

/* Better mobile table */
@media (max-width: 767px) {
    .comparison-table {
        font-size: 0.875rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: var(--space-xs) var(--space-sm);
    }

    /* Hide less important columns on mobile */
    .comparison-table th:nth-child(5),
    .comparison-table td:nth-child(5),
    .comparison-table th:nth-child(6),
    .comparison-table td:nth-child(6) {
        display: none;
    }
}

/* Table shadow on scroll */
.table-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
}

.table-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to right, transparent, rgba(0,0,0,0.05));
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition);
}

.table-wrapper:hover::after {
    opacity: 1;
}

/* --------------------------------------------------------------------------
   Enhanced FAQ
   -------------------------------------------------------------------------- */
.faq-item {
    border-left: 4px solid transparent;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.faq-item:hover {
    border-left-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

/* --------------------------------------------------------------------------
   Premium Buttons
   -------------------------------------------------------------------------- */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

/* --------------------------------------------------------------------------
   Enhanced Ideal For Box
   -------------------------------------------------------------------------- */
.ideal-for {
    position: relative;
    overflow: hidden;
}

.ideal-for::before {
    content: '✓';
    position: absolute;
    top: -20px;
    right: -10px;
    font-size: 120px;
    opacity: 0.1;
    font-weight: 800;
}

/* --------------------------------------------------------------------------
   TOC Enhancement
   -------------------------------------------------------------------------- */
.toc {
    position: relative;
    overflow: hidden;
}

.toc::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--color-primary-light), transparent);
    opacity: 0.1;
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.toc ol {
    counter-reset: toc-counter;
    list-style: none;
}

.toc li {
    counter-increment: toc-counter;
    position: relative;
    padding-left: 2.5rem;
}

.toc li::before {
    content: counter(toc-counter);
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1.75rem;
    height: 1.75rem;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   Smooth Animations on Scroll
   -------------------------------------------------------------------------- */
.marathon-card,
.faq-item,
.toc {
    opacity: 1;
    transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Better Focus States (Accessibility)
   -------------------------------------------------------------------------- */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 3px;
}

.btn:focus-visible {
    outline-color: var(--color-white);
}

/* --------------------------------------------------------------------------
   Back to Top Button
   -------------------------------------------------------------------------- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

.back-to-top:active {
    transform: translateY(0);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 767px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }

    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

/* --------------------------------------------------------------------------
   Language Toggle Button
   -------------------------------------------------------------------------- */
.lang-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 2px solid var(--color-border);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition);
    color: var(--color-text);
    flex-shrink: 0;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
}

.lang-toggle:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(255, 107, 53, 0.05);
}

.lang-label {
    line-height: 1;
}

/* Mobile: Position absolute */
@media (max-width: 767px) {
    .lang-toggle {
        position: absolute;
        top: 17px;
        right: 100px;
    }
}

/* Desktop: Inline with nav */
@media (min-width: 768px) {
    .lang-toggle {
        margin-left: var(--space-md);
    }
}

/* Dark mode */
[data-theme="dark"] .lang-toggle {
    border-color: #555;
    color: #e0e0e0;
}

[data-theme="dark"] .lang-toggle:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(255, 107, 53, 0.1);
}

/* --------------------------------------------------------------------------
   Theme Toggle Button
   -------------------------------------------------------------------------- */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 2px solid var(--color-border);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition);
    color: var(--color-text);
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(255, 107, 53, 0.05);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Light mode: show sun, hide moon */
.theme-toggle .icon-sun {
    display: block;
}

.theme-toggle .icon-moon {
    display: none;
}

/* Dark mode: show moon, hide sun */
[data-theme="dark"] .theme-toggle .icon-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: block;
}

/* Mobile: Position absolute */
@media (max-width: 767px) {
    .theme-toggle {
        position: absolute;
        top: 17px;
        right: 60px;
    }
}

/* Desktop: Inline with nav */
@media (min-width: 768px) {
    .theme-toggle {
        margin-left: var(--space-md);
    }
}

/* --------------------------------------------------------------------------
   Enhanced Footer
   -------------------------------------------------------------------------- */
.footer {
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-dark), var(--color-primary));
}

/* --------------------------------------------------------------------------
   Large Desktop Enhancements
   -------------------------------------------------------------------------- */
@media (min-width: 1200px) {
    .container {
        padding: 0 var(--space-xl);
    }

    .marathon-layout {
        grid-template-columns: 1fr 350px;
    }
}

/* --------------------------------------------------------------------------
   Dark Mode Support (Toggle + System Preference)
   -------------------------------------------------------------------------- */

/* Dark mode styles - applied via data-theme attribute OR system preference */
[data-theme="dark"],
html:not([data-theme="light"]):root:has(body) {
    --color-accent: #1a1a2e;
    --color-white: #0f0f1a;
    --color-text: #e0e0e0;
    --color-text-light: #a0a0a0;
    --color-border: #333;
}

/* Explicit dark mode via toggle */
[data-theme="dark"] body {
    background: #0f0f1a;
}

[data-theme="dark"] .header {
    background: rgba(15, 15, 26, 0.95);
}

[data-theme="dark"] .nav-menu a {
    color: #e0e0e0;
}

[data-theme="dark"] .marathon-card {
    background: #0f0f1a;
}

[data-theme="dark"] .marathon-card-alt {
    background: #1a1a2e;
}

[data-theme="dark"] .fact {
    background: #1a1a2e;
}

[data-theme="dark"] .facts-box {
    background: #1a1a2e;
    border-color: #333;
}

[data-theme="dark"] .faq-item {
    background: #1a1a2e;
}

[data-theme="dark"] .comparison-table,
[data-theme="dark"] .termine-table {
    background: #1a1a2e;
}

[data-theme="dark"] .comparison-table th,
[data-theme="dark"] .termine-table th {
    background: var(--color-primary);
}

[data-theme="dark"] .comparison-table td,
[data-theme="dark"] .termine-table td {
    color: #e0e0e0;
}

[data-theme="dark"] .toc {
    background: #1a1a2e;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: #ffffff;
}

[data-theme="dark"] .signup-info {
    background: #1a1a2e;
}

/* Quiz Dark Mode */
[data-theme="dark"] .quiz {
    background: #1a1a2e;
}

[data-theme="dark"] .quiz-container {
    background: #0f0f1a;
}

[data-theme="dark"] .quiz-option {
    background: #1a1a2e;
    border-color: #333;
    color: #e0e0e0;
}

[data-theme="dark"] .quiz-option:hover {
    border-color: var(--color-primary);
    background: rgba(255, 107, 53, 0.1);
}

[data-theme="dark"] .btn-outline {
    border-color: #555;
    color: #a0a0a0;
}

[data-theme="dark"] .btn-outline:hover {
    background: #1a1a2e;
    border-color: #777;
    color: #e0e0e0;
}

[data-theme="dark"] .btn-secondary {
    border-color: rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .theme-toggle {
    border-color: #555;
    color: #e0e0e0;
}

[data-theme="dark"] .theme-toggle:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(255, 107, 53, 0.1);
}

[data-theme="dark"] .dropdown-menu {
    background: #1a1a2e;
}

[data-theme="dark"] .dropdown-menu a {
    color: #e0e0e0;
}

[data-theme="dark"] .dropdown-menu a:hover {
    background: #0f0f1a;
}

/* System preference fallback (when no explicit theme set) */
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) body {
        background: #0f0f1a;
    }

    html:not([data-theme="light"]) .header {
        background: rgba(15, 15, 26, 0.95);
    }

    html:not([data-theme="light"]) .nav-menu a {
        color: #e0e0e0;
    }

    html:not([data-theme="light"]) .marathon-card {
        background: #0f0f1a;
    }

    html:not([data-theme="light"]) .marathon-card-alt,
    html:not([data-theme="light"]) .fact,
    html:not([data-theme="light"]) .facts-box,
    html:not([data-theme="light"]) .faq-item,
    html:not([data-theme="light"]) .comparison-table,
    html:not([data-theme="light"]) .termine-table,
    html:not([data-theme="light"]) .toc,
    html:not([data-theme="light"]) .signup-info,
    html:not([data-theme="light"]) .quiz-container,
    html:not([data-theme="light"]) .quiz-option,
    html:not([data-theme="light"]) .dropdown-menu {
        background: #1a1a2e;
    }

    html:not([data-theme="light"]) .quiz {
        background: #1a1a2e;
    }

    html:not([data-theme="light"]) h1,
    html:not([data-theme="light"]) h2,
    html:not([data-theme="light"]) h3,
    html:not([data-theme="light"]) h4,
    html:not([data-theme="light"]) h5,
    html:not([data-theme="light"]) h6 {
        color: #ffffff;
    }

    html:not([data-theme="light"]) .theme-toggle {
        border-color: #555;
        color: #e0e0e0;
    }

    html:not([data-theme="light"]) .theme-toggle .icon-sun {
        display: none;
    }

    html:not([data-theme="light"]) .theme-toggle .icon-moon {
        display: block;
    }
}

/* --------------------------------------------------------------------------
   Legal Pages (Impressum, Datenschutz)
   -------------------------------------------------------------------------- */
.legal-page {
    padding-top: calc(80px + var(--space-xl));
}

.legal-page h1 {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--color-primary);
}

.legal-page h2 {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
    font-size: 1.5rem;
}

.legal-page h3 {
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
    font-size: 1.125rem;
}

.legal-page p {
    margin-bottom: var(--space-md);
}

.legal-page ul,
.legal-page ol {
    margin-bottom: var(--space-md);
    padding-left: var(--space-lg);
}

.legal-page li {
    margin-bottom: var(--space-xs);
}

.legal-page em {
    color: var(--color-text-light);
}

[data-theme="dark"] .legal-page h1 {
    color: #ffffff;
}

[data-theme="dark"] .legal-page h2,
[data-theme="dark"] .legal-page h3 {
    color: #ffffff;
}
