/**
 * Custom CSS für LP-VT Veranstaltungstechnik Website
 * Barrierefreies Design mit dunklem Theme und Hellblau-Kontrast
 * WCAG 2.1 Level AA konform
 */

:root {
    /* Farben - 90% Schwarz Design, Blau nur für Linien */
    --color-dark: #0a0a0a;
    --color-dark-secondary: #151515;
    --color-dark-tertiary: #1a1a1a;
    --color-light-blue: #4A9EFF;
    --color-text-primary: #ffffff;
    --color-text-secondary: #e0e0e0;
    --color-text-muted: #b0b0b0;
    --color-success: #28a745;
    --color-error: #dc3545;
    --color-warning: #ffc107;
    
    /* Kontrastverhältnisse (WCAG AA):
     * Weiß auf Schwarz: 21:1 ✓
     * Text-Sekundär auf Schwarz: 11.4:1 ✓
     */
}

/* Reset und Basis-Styles */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    background-color: var(--color-dark);
    color: var(--color-text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    padding-top: 80px; /* Platz für fixed Header */
    min-height: 100vh;
    position: relative;
}

/* Hintergrundbild mit Overlay für Lesbarkeit */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/Hintergrund.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 0.15;
    z-index: -1;
}

/* Skip-Link für Barrierefreiheit */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-light-blue);
    color: var(--color-text-primary);
    padding: 8px 16px;
    text-decoration: none;
    z-index: 1000;
    font-weight: bold;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid var(--color-light-blue);
    outline-offset: 2px;
}

/* Typografie */
h1, h2, h3, h4, h5, h6 {
    color: var(--color-text-primary);
    font-weight: 700;
    line-height: 1.2;
    margin-top: 0;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 0.875rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
    color: var(--color-text-secondary);
}

a {
    color: var(--color-text-primary);
    text-decoration: underline;
    text-decoration-color: var(--color-light-blue);
    text-underline-offset: 3px;
    transition: color 0.3s ease, text-decoration-color 0.3s ease;
}

a:hover, a:focus {
    color: var(--color-text-secondary);
    text-decoration-color: var(--color-light-blue);
}

a:focus {
    outline: 2px solid var(--color-light-blue);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Safari Tab-Navigation Fix */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--color-light-blue) !important;
    outline-offset: 2px;
    -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-light-blue) !important;
    outline-offset: 2px;
}

/* Navigation */
.navbar {
    background-color: var(--color-dark);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--color-light-blue);
    padding: 1rem 0;
}

.navbar-logo {
    max-height: 80px;
    width: auto;
    height: auto;
}

.navbar-brand {
    padding: 0.5rem 0;
}

.navbar-nav .nav-link {
    color: var(--color-text-primary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    background-color: var(--color-dark-secondary);
    color: var(--color-text-primary) !important;
    border-bottom: 2px solid var(--color-light-blue);
}

.navbar-nav .nav-link.active {
    background-color: var(--color-dark-secondary);
    color: var(--color-text-primary) !important;
    border-bottom: 2px solid var(--color-light-blue);
}

.navbar-toggler {
    border-color: var(--color-light-blue);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2874, 158, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: 2px solid var(--color-light-blue);
}

.btn-primary {
    background-color: var(--color-dark);
    border-color: var(--color-light-blue);
    color: var(--color-text-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--color-dark-secondary);
    border-color: var(--color-light-blue);
    color: var(--color-text-primary);
    transform: translateY(-2px);
}

.btn-primary:active {
    background-color: var(--color-dark-tertiary);
    border-color: var(--color-light-blue);
}

.btn-primary:focus {
    outline: 2px solid var(--color-light-blue);
    outline-offset: 2px;
}

.btn-outline-primary {
    border-color: var(--color-light-blue);
    color: var(--color-text-primary);
    background-color: transparent;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--color-dark-secondary);
    border-color: var(--color-light-blue);
    color: var(--color-text-primary);
}

/* Formulare */
.form-control,
.form-select {
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--color-text-primary);
    padding: 0.75rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    background-color: var(--color-dark-tertiary);
    border-color: var(--color-light-blue);
    color: var(--color-text-primary);
    outline: 2px solid var(--color-light-blue);
    outline-offset: 2px;
    box-shadow: none;
}

.form-control::placeholder {
    color: var(--color-text-muted);
}

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

.form-text {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.invalid-feedback {
    color: var(--color-error);
    font-weight: 500;
}

.valid-feedback {
    color: var(--color-success);
}

/* Cards */
.card {
    background-color: var(--color-dark-secondary);
    border: 1px solid var(--color-light-blue);
    border-radius: 8px;
    color: var(--color-text-secondary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(74, 158, 255, 0.2);
    border-color: var(--color-light-blue);
}

.card-header {
    background-color: var(--color-dark-tertiary);
    border-bottom: 1px solid var(--color-light-blue);
    color: var(--color-text-primary);
    font-weight: 600;
}

/* Hero Section */
.hero-section {
    background-color: var(--color-dark);
    padding: 4rem 0;
    text-align: center;
    position: relative;
    border-bottom: 2px solid var(--color-light-blue);
}

.hero-section h1 {
    color: var(--color-text-primary);
    margin-bottom: 1.5rem;
}

.hero-section p {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    max-width: 800px;
    margin: 0 auto 2rem;
}

/* Sections */
.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--color-text-primary);
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 2px;
    background-color: var(--color-light-blue);
    margin: 1rem auto 0;
}

/* Footer */
.footer {
    background-color: var(--color-dark);
    border-top: 2px solid var(--color-light-blue);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer h5 {
    color: var(--color-text-primary);
    margin-bottom: 1rem;
}

.footer p,
.footer a {
    color: var(--color-text-secondary);
}

.footer a:hover {
    color: var(--color-text-secondary);
    text-decoration-color: var(--color-light-blue);
}

/* Alerts */
.alert {
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 2px solid;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.2);
    border-color: var(--color-success);
    color: var(--color-success);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.2);
    border-color: var(--color-error);
    color: var(--color-error);
}

.alert-info {
    background-color: var(--color-dark-secondary);
    border-color: var(--color-light-blue);
    color: var(--color-text-primary);
}

/* Projekt-Galerie */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background-color: var(--color-dark-secondary);
    border: 1px solid var(--color-light-blue);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(74, 158, 255, 0.3);
    border-color: var(--color-light-blue);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-card-body {
    padding: 1.5rem;
}

/* Kontaktformular */
.contact-form {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--color-dark-secondary);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--color-light-blue);
}

/* Honeypot-Feld (Spam-Schutz) */
.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

/* Fokus-Indikatoren für Barrierefreiheit - Safari Fix */
*:focus {
    outline: 2px solid var(--color-light-blue) !important;
    outline-offset: 2px;
    border-radius: 2px;
}

*:focus-visible {
    outline: 2px solid var(--color-light-blue) !important;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Safari spezifische Fixes */
@supports (-webkit-appearance: none) {
    a:focus,
    button:focus,
    input:focus,
    select:focus,
    textarea:focus,
    [tabindex]:focus {
        outline: 2px solid var(--color-light-blue) !important;
        outline-offset: 2px;
        -webkit-tap-highlight-color: transparent;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
}

/* Print Styles */
@media print {
    body::before {
        display: none;
    }
    
    .navbar,
    .footer {
        display: none;
    }
}
