/* FactoringWerkstatt - Custom Styles */

/* CSS Custom Properties for Brand Colors - Logo-basiert */
:root {
    --primary-color: #1B4A8B;          /* Dunkles Logo-Blau */
    --primary-light: #2563EB;          /* Mittleres Logo-Blau */
    --primary-lighter: #60A5FA;        /* Helleres Logo-Blau */
    --primary-dark: #1E3A8A;           /* Sehr dunkles Blau */
    --secondary-color: #0EA5E9;        /* Helles Akzent-Blau aus Logo */
    --secondary-dark: #0284C7;         /* Dunkleres Akzent-Blau */
    --success-color: #10B981;
    --danger-color: #EF4444;
    --dark-color: #0F172A;             /* Dunkleres Corporate-Design */
    --light-color: #F8FAFC;            /* Hellere Basis */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Form Success and Error Messages */
.success-message {
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    margin: 1rem 0;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    border-left: 4px solid #065F46;
    animation: slideInFromRight 0.5s ease-out;
}

.error-message {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    margin: 1rem 0;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    border-left: 4px solid #991B1B;
    animation: slideInFromRight 0.5s ease-out;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Factoring Form Enhancements */
.factoring-form-container {
    background: linear-gradient(135deg, rgba(27, 74, 139, 0.02), rgba(14, 165, 233, 0.02));
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid rgba(27, 74, 139, 0.1);
}

/* Loading state for form buttons */
button.loading {
    position: relative;
    pointer-events: none;
}

button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Form field focus improvements */
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(27, 74, 139, 0.1);
    border-color: var(--primary-color);
    outline: none;
}

/* Accessibility improvements */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

.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;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateY(0);
    }
    40%, 43% {
        transform: translateY(-10px);
    }
    70% {
        transform: translateY(-5px);
    }
    90% {
        transform: translateY(-2px);
    }
}

/* Animation classes */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

/* Hover effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Button hover effects - Logo-Farben */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(27, 74, 139, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--primary-light) 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(14, 165, 233, 0.4);
}

/* Navigation enhancements */
.navbar-sticky {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

/* Hero section enhancements - Logo-basiert */
.hero-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 50%, var(--secondary-color) 100%);
    position: relative;
    overflow: hidden;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(14, 165, 233, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(96, 165, 250, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(37, 99, 235, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

/* Card enhancements */
.card-hover {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

/* Icon animations */
.icon-bounce:hover {
    animation: bounce 1s;
}

.icon-pulse:hover {
    animation: pulse 1s;
}

/* Form enhancements */
.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
    border-color: var(--primary-color);
}

/* FAQ Section */
.faq-button:hover {
    background-color: var(--gray-100);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-content.show {
    max-height: 500px;
}

/* Section dividers */
.section-divider {
    position: relative;
}

.section-divider::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* Trust indicators */
.trust-indicator {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Testimonial styling */
.testimonial-quote {
    position: relative;
    font-style: italic;
}

.testimonial-quote::before {
    content: '"';
    font-size: 4rem;
    color: var(--secondary-color);
    position: absolute;
    top: -1rem;
    left: -2rem;
    font-family: Georgia, serif;
}

/* Process steps */
.process-step {
    position: relative;
}

.process-step::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -2rem;
    transform: translateY(-50%);
    width: 2rem;
    height: 2px;
    background: var(--primary-color);
}

.process-step:last-child::after {
    display: none;
}

/* Brand section styling */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    align-items: center;
}

.brand-item {
    opacity: 0.6;
    transition: opacity 0.3s ease;
    filter: grayscale(100%);
}

.brand-item:hover {
    opacity: 1;
    filter: grayscale(0%);
}

/* Mobile menu */
.mobile-menu {
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.mobile-menu.show {
    transform: translateY(0);
}

/* Scroll animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

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

/* Success states */
.success-message {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    margin-top: 1rem;
    animation: fadeInUp 0.5s ease;
}

/* Error states */
.error-message {
    background: linear-gradient(135deg, var(--danger-color), #DC2626);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    margin-top: 1rem;
    animation: fadeInUp 0.5s ease;
}

/* Typography enhancements */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Custom utilities */
.bg-pattern {
    background-image: 
        radial-gradient(circle at 25px 25px, rgba(30, 64, 175, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 75px 75px, rgba(245, 158, 11, 0.1) 2px, transparent 2px);
    background-size: 100px 100px;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}

/* Dark mode support (for future implementation) */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #F9FAFB;
        --bg-color: #1F2937;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .card-hover {
        border: 2px solid var(--primary-color);
    }
    
    .btn-primary, .btn-secondary {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Focus styles for accessibility */
:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    border-radius: 4px;
    text-decoration: none;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* RTL support (for future international expansion) */
[dir="rtl"] .process-step::after {
    right: auto;
    left: -2rem;
}

/* Performance optimizations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* Browser-specific optimizations */
@supports (backdrop-filter: blur(10px)) {
    .glass-effect {
        backdrop-filter: blur(10px);
    }
}

@supports not (backdrop-filter: blur(10px)) {
    .glass-effect {
        background: rgba(255, 255, 255, 0.9);
    }
}

/* Container queries for advanced responsive design */
@container (min-width: 768px) {
    .container-responsive {
        padding: 2rem;
    }
}

/* Video Section Enhancements */
.aspect-w-16 {
    position: relative;
}

.aspect-w-16::before {
    content: '';
    display: block;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.video-container {
    transition: all 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.video-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 35px 60px -12px rgba(0, 0, 0, 0.3);
}

.video-overlay {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.9), rgba(30, 58, 138, 0.9));
    transition: opacity 0.5s ease;
}

.video-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Video responsive iframe */
.video-container iframe {
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Mobile video optimizations */
@media (max-width: 768px) {
    .video-container {
        margin: 0 -1rem;
        border-radius: 0;
    }
    
    .video-container iframe {
        border-radius: 0;
    }
    
    .aspect-w-16::before {
        padding-bottom: 60%; /* Slightly taller aspect ratio for mobile */
    }
}

/* Video loading animation */
.video-loading {
    position: relative;
    overflow: hidden;
}

.video-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Logo enhancements - Transparenz-optimiert */
.logo-container {
    transition: all 0.3s ease;
}

.logo-container:hover {
    transform: scale(1.02);
}

.logo-container img {
    filter: drop-shadow(0 2px 4px rgba(27, 74, 139, 0.15));
    transition: filter 0.3s ease;
    background: transparent;
}

.logo-container:hover img {
    filter: drop-shadow(0 4px 8px rgba(27, 74, 139, 0.25));
}

/* Transparentes Logo auf verschiedenen Hintergründen */
.logo-on-dark img {
    filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.1));
}

.logo-on-dark:hover img {
    filter: drop-shadow(0 4px 8px rgba(255, 255, 255, 0.2));
}

.logo-on-light img {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.logo-on-light:hover img {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

/* Brand colors for text selection */
::selection {
    background-color: var(--primary-color);
    color: white;
}

::-moz-selection {
    background-color: var(--primary-color);
    color: white;
}

/* Logo-inspired gradients */
.gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

.gradient-secondary {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
}

.gradient-brand {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}