/* ============================================
   Zirkuswagenprojekt - CSS Design System
   WCAG 2.1 AA konform - Mindestkontrast 4.5:1
   ============================================ */

/* Tailwind-ähnliche Utility Variables */
:root {
    /* Zirkus Color Palette - WCAG AA optimiert */
    --zirkus-cream: #FDF8F0;
    --zirkus-cream-light: rgba(253, 248, 240, 0.95);
    --zirkus-sand: #D4C4B0;
    --zirkus-wood: #3D2E22;
    /* Dunkler für besseren Kontrast */
    --zirkus-wood-dark: #1F1612;
    /* Sehr dunkel für Footer */
    --zirkus-wood-light: #5C4736;
    /* Heller Holzton */
    --zirkus-gold: #996B00;
    /* Dunkler Gold für besseren Kontrast auf Hell */
    --zirkus-gold-light: #B8860B;
    --zirkus-gold-bright: #DAA520;
    --zirkus-forest: #1E4620;
    /* Dunkler Grün */
    --zirkus-forest-light: #2D6B2A;

    /* Accessible Footer Colors - hoher Kontrast */
    --footer-bg: #1F1612;
    --footer-text: #E8DDD0;
    /* Kontrastverhältnis 10.5:1 */
    --footer-text-muted: #C4B8AA;
    /* Kontrastverhältnis 7.2:1 */
    --footer-heading: #DAA520;
    /* Goldton gut sichtbar */

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;

    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);

    /* Focus-Styles für Barrierefreiheit */
    --focus-outline: 3px solid var(--zirkus-gold-bright);
    --focus-offset: 2px;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

/* Reduziere Bewegung für Nutzer mit vestibulären Störungen */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: var(--font-body);
    background-color: var(--zirkus-cream);
    color: var(--zirkus-wood);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================
   Fokus-Styles für Barrierefreiheit
   ============================================ */
:focus {
    outline: var(--focus-outline);
    outline-offset: var(--focus-offset);
}

:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: var(--focus-outline);
    outline-offset: var(--focus-offset);
}

/* Layout Utilities */
.min-h-screen {
    min-height: 100vh;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-grow {
    flex-grow: 1;
}

.bg-zirkus-cream {
    background-color: var(--zirkus-cream);
}

/* Skip Link (Accessibility) - VERBESSERT */
.skip-link {
    position: absolute;
    left: -9999px;
    top: var(--space-4);
    z-index: 100;
    padding: var(--space-3) var(--space-6);
    background-color: var(--zirkus-wood);
    color: var(--zirkus-cream);
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
}

.skip-link:focus {
    left: var(--space-4);
    outline: var(--focus-outline);
    outline-offset: var(--focus-offset);
}

/* ============================================
   Header & Navigation
   ============================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: var(--zirkus-cream-light);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--zirkus-sand);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 5rem;
}

@media (min-width: 1024px) {
    .nav-inner {
        height: 6rem;
    }
}

.logo-link {
    display: flex;
    align-items: center;
    transition: transform var(--transition-normal);
}

.logo-link:hover {
    transform: scale(1.05);
}

.logo {
    height: 4rem;
    width: auto;
}

@media (min-width: 1024px) {
    .logo {
        height: 5rem;
    }
}

/* Desktop Navigation */
.nav-links {
    display: none;
    align-items: center;
    gap: var(--space-1);
}

@media (min-width: 1024px) {
    .nav-links {
        display: flex;
    }
}

.nav-link {
    position: relative;
    padding: var(--space-2) var(--space-4);
    font-size: 1rem;
    font-weight: 600;
    color: var(--zirkus-wood);
    text-decoration: none;
    transition: color var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
    color: var(--zirkus-gold);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background-color: var(--zirkus-gold);
    transition: width var(--transition-normal);
}

.nav-link.active::after {
    width: 100%;
}

.nav-link:hover::after {
    width: 80%;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3);
    border: 2px solid transparent;
    background: transparent;
    color: var(--zirkus-wood);
    cursor: pointer;
    border-radius: 0.5rem;
    transition: all var(--transition-fast);
}

.mobile-menu-btn:hover {
    color: var(--zirkus-gold);
    background-color: rgba(212, 196, 176, 0.5);
}

.mobile-menu-btn:focus-visible {
    border-color: var(--zirkus-gold-bright);
}

@media (min-width: 1024px) {
    .mobile-menu-btn {
        display: none;
    }
}

.w-7 {
    width: 1.75rem;
}

.h-7 {
    height: 1.75rem;
}

.w-6 {
    width: 1.5rem;
}

.h-6 {
    height: 1.5rem;
}

.hidden {
    display: none !important;
}

/* Mobile Navigation */
.mobile-nav {
    padding-bottom: var(--space-6);
    border-top: 1px solid var(--zirkus-sand);
}

@media (min-width: 1024px) {
    .mobile-nav {
        display: none !important;
    }
}

.mobile-nav-link {
    display: block;
    padding: var(--space-3) var(--space-4);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--zirkus-wood);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all var(--transition-fast);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--zirkus-gold);
    background-color: rgba(212, 196, 176, 0.5);
}

/* ============================================
   Flash Messages
   ============================================ */
.flash-message {
    max-width: 80rem;
    margin: var(--space-4) auto;
    padding: var(--space-4);
    border-radius: 0.5rem;
    border-left: 4px solid;
}

.flash-success {
    background-color: rgba(30, 70, 32, 0.15);
    border-color: var(--zirkus-forest);
    color: var(--zirkus-forest);
}

.flash-error {
    background-color: rgba(185, 28, 28, 0.1);
    border-color: #b91c1c;
    color: #991b1b;
}

/* ============================================
   Footer - WCAG AA konform
   ============================================ */
.footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    margin-top: auto;
}

.footer-border {
    height: 4px;
    background: linear-gradient(90deg, var(--zirkus-gold), var(--zirkus-gold-bright), var(--zirkus-gold));
}

.footer-content {
    max-width: 80rem;
    margin: 0 auto;
    padding: var(--space-12) var(--space-4);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-logo {
    height: 4rem;
    width: auto;
    margin-bottom: var(--space-4);
}

.footer-heading {
    color: var(--footer-heading);
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.footer-text {
    color: var(--footer-text);
    font-size: 0.9375rem;
    line-height: 1.7;
}

.footer-text .font-medium {
    font-weight: 600;
    color: var(--footer-text);
}

.footer-text .font-mono {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.875rem;
    letter-spacing: 0.02em;
}

.footer-text .text-xs {
    font-size: 0.8125rem;
}

.btn-donate {
    display: inline-block;
    margin-top: var(--space-3);
    padding: var(--space-3) var(--space-6);
    background-color: var(--zirkus-gold);
    border: none;
    color: var(--footer-bg);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.btn-donate:hover {
    background-color: var(--zirkus-gold-bright);
    text-decoration: none;
}

.social-links {
    display: flex;
    gap: var(--space-4);
}

.social-link {
    color: var(--footer-text-muted);
    transition: color var(--transition-fast);
    padding: var(--space-2);
    border-radius: 0.25rem;
}

.social-link:hover {
    color: var(--footer-heading);
}

.footer-bottom {
    margin-top: var(--space-10);
    padding-top: var(--space-8);
    border-top: 1px solid rgba(200, 180, 160, 0.2);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    align-items: center;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-copyright {
    color: var(--footer-text-muted);
    font-size: 0.9375rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-6);
}

.footer-link {
    color: var(--footer-text-muted);
    font-size: 0.9375rem;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: color var(--transition-fast);
    padding: var(--space-1);
}

.footer-link:hover {
    color: var(--footer-heading);
    text-decoration: underline;
}

/* ============================================
   Cookie Banner - WCAG AA konform
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: var(--footer-bg);
    border-top: 3px solid var(--zirkus-gold);
    padding: var(--space-6) var(--space-4);
    transform: translateY(100%);
    transition: transform var(--transition-normal);
}

.cookie-banner.visible {
    transform: translateY(0);
}

.cookie-content {
    max-width: 80rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

@media (min-width: 768px) {
    .cookie-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.cookie-text {
    color: var(--footer-text);
    font-size: 0.9375rem;
}

.cookie-text a {
    color: var(--footer-heading);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.btn-cookie {
    padding: var(--space-3) var(--space-6);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-cookie-accept {
    background-color: var(--zirkus-gold);
    color: var(--footer-bg);
    border: none;
}

.btn-cookie-accept:hover {
    background-color: var(--zirkus-gold-bright);
}

.btn-cookie-reject {
    background-color: transparent;
    color: var(--footer-text);
    border: 2px solid var(--footer-text-muted);
}

.btn-cookie-reject:hover {
    border-color: var(--footer-text);
    color: var(--footer-text);
}

/* ============================================
   Typography - WCAG AA konform
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    color: var(--zirkus-wood);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

@media (min-width: 768px) {
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.5rem;
    }

    h3 {
        font-size: 1.75rem;
    }
}

p {
    margin-bottom: var(--space-4);
}

a {
    color: var(--zirkus-gold);
    text-decoration: underline;
    text-underline-offset: 2px;
}

a:hover {
    color: var(--zirkus-gold-light);
}

/* ============================================
   Buttons - WCAG AA konform
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) var(--space-6);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    border: none;
}

.btn-primary {
    background-color: var(--zirkus-gold);
    color: white;
}

.btn-primary:hover {
    background-color: var(--zirkus-gold-light);
    text-decoration: none;
}

.btn-secondary {
    background-color: var(--zirkus-wood);
    color: var(--zirkus-cream);
}

.btn-secondary:hover {
    background-color: var(--zirkus-wood-light);
    text-decoration: none;
}

.btn-outline {
    background-color: transparent;
    color: var(--zirkus-gold);
    border: 2px solid var(--zirkus-gold);
}

.btn-outline:hover {
    background-color: var(--zirkus-gold);
    color: white;
    text-decoration: none;
}

/* ============================================
   Hero Section - Hell auf Dunkel, hoher Kontrast
   ============================================ */
.hero {
    background-color: var(--zirkus-wood-dark);
    color: var(--zirkus-cream);
    padding: var(--space-20) var(--space-4);
    text-align: center;
}

.hero h1 {
    color: var(--zirkus-cream);
    margin-bottom: var(--space-4);
}

.hero p {
    color: var(--zirkus-sand);
    font-size: 1.25rem;
}

.hero .btn-primary {
    margin-top: var(--space-6);
}

/* ============================================
   Cards
   ============================================ */
.card {
    background-color: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all var(--transition-normal);
    text-decoration: none;
    color: inherit;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: var(--space-6);
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: var(--space-2);
    color: var(--zirkus-wood);
}

.card-text {
    color: var(--zirkus-wood-light);
    font-size: 0.9375rem;
}

/* ============================================
   Section Containers
   ============================================ */
.section {
    padding: var(--space-16) var(--space-4);
}

.section-alt {
    background-color: var(--zirkus-sand);
}

.container {
    max-width: 80rem;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-12);
}

.section-title h2 {
    margin-bottom: var(--space-4);
}

.section-title p {
    color: var(--zirkus-wood-light);
    max-width: 40rem;
    margin: 0 auto;
}

/* ============================================
   Forms - WCAG AA konform
   ============================================ */
/* ... existing form styles ... */

/* ============================================
   Partner & Supporters Section
   ============================================ */
.partner-section-title {
    margin-top: var(--space-16);
    text-align: center;
}

.partner-section-title h2 {
    color: var(--zirkus-gold-bright) !important;
    /* Better visibility on dark */
}

.partner-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
    padding: 3rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.partner-logo {
    height: 50px;
    width: auto;
    max-width: 180px;
    opacity: 0.9;
    transition: all var(--transition-normal);
    filter: brightness(0) invert(1);
    /* Force white for mono look on dark */
}

.partner-logo:hover {
    opacity: 1;
    filter: none;
    /* Show real colors on hover */
    transform: scale(1.1);
}

.partner-thanks {
    text-align: center;
    margin-top: var(--space-8);
    color: var(--zirkus-sand);
    font-size: 0.875rem;
}

/* ============================================
   Forms - WCAG AA konform
   ============================================ */
.form-group {
    margin-bottom: var(--space-4);
}

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 600;
    color: var(--zirkus-wood);
}

.form-control {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: 1rem;
    border: 2px solid var(--zirkus-sand);
    border-radius: 0.5rem;
    background-color: white;
    color: var(--zirkus-wood);
    transition: all var(--transition-fast);
}

.form-control::placeholder {
    color: var(--zirkus-wood-light);
}

.form-control:focus {
    outline: none;
    border-color: var(--zirkus-gold);
    box-shadow: 0 0 0 3px rgba(153, 107, 0, 0.25);
}

.form-control.is-invalid {
    border-color: #b91c1c;
}

.invalid-feedback {
    color: #991b1b;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: var(--space-1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* ============================================
   Grid System
   ============================================ */
.grid {
    display: grid;
    gap: var(--space-6);
}

.grid-2 {
    grid-template-columns: repeat(1, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(1, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 640px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* ============================================
   Status Badge
   ============================================ */
.badge {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    font-size: 0.8125rem;
    font-weight: 700;
    border-radius: 9999px;
    text-transform: uppercase;
}

.badge-planned {
    background-color: rgba(153, 107, 0, 0.2);
    color: var(--zirkus-gold);
}

.badge-in-progress {
    background-color: rgba(30, 70, 32, 0.2);
    color: var(--zirkus-forest);
}

.badge-completed {
    background-color: rgba(61, 46, 34, 0.2);
    color: var(--zirkus-wood);
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center {
    text-align: center;
}

.text-gold {
    color: var(--zirkus-gold);
}

.text-wood {
    color: var(--zirkus-wood);
}

.text-muted {
    color: var(--zirkus-wood-light);
}

.mb-0 {
    margin-bottom: 0;
}

.mb-2 {
    margin-bottom: var(--space-2);
}

.mb-4 {
    margin-bottom: var(--space-4);
}

.mb-6 {
    margin-bottom: var(--space-6);
}

.mb-8 {
    margin-bottom: var(--space-8);
}

.mt-4 {
    margin-top: var(--space-4);
}

.mt-6 {
    margin-top: var(--space-6);
}

.mt-8 {
    margin-top: var(--space-8);
}

.mt-12 {
    margin-top: var(--space-12);
}

.p-4 {
    padding: var(--space-4);
}

.p-6 {
    padding: var(--space-6);
}

.p-8 {
    padding: var(--space-8);
}

/* Screen-Reader Only (für barrierefreie Labels) */
.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;
}

/* ============================================
   Prose Content (für statische Seiten)
   ============================================ */
.prose {
    max-width: 65ch;
    line-height: 1.8;
}

.prose h2 {
    margin-top: var(--space-10);
    margin-bottom: var(--space-4);
}

.prose h3 {
    margin-top: var(--space-8);
    margin-bottom: var(--space-3);
}

.prose p {
    margin-bottom: var(--space-4);
}

.prose ul,
.prose ol {
    margin-bottom: var(--space-4);
    padding-left: var(--space-6);
}

.prose li {
    margin-bottom: var(--space-2);
}

.prose a {
    color: var(--zirkus-gold);
    text-decoration: underline;
}

.prose strong {
    font-weight: 600;
}

/* ============================================
   Responsive Utilities
   ============================================ */
@media (min-width: 640px) {
    .sm\:hidden {
        display: none;
    }
}

@media (min-width: 768px) {
    .md\:hidden {
        display: none;
    }

    .md\:block {
        display: block;
    }

    .md\:flex {
        display: flex;
    }
}

@media (min-width: 1024px) {
    .lg\:hidden {
        display: none;
    }

    .lg\:block {
        display: block;
    }

    .lg\:flex {
        display: flex;
    }
}