/* Enhanced CSS for Fischer Medien Management - Mobile-First Responsive Design */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #475569;
    --secondary-light: #64748b;
    --accent-color: #a855f7;
    --dark-color: #0f172a;
    --light-color: #f8fafc;
    --text-light: #f1f5f9;
    --text-dark: #334155;
    --gradient-start: #1e293b;
    --gradient-end: #334155;
    --gradient-accent: #a855f7;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #0ea5e9;
    --font-family: 'Inter', sans-serif;
    
    /* Responsive Typography */
    --font-size-xs: clamp(0.75rem, 2vw, 0.875rem);
    --font-size-sm: clamp(0.875rem, 2.5vw, 1rem);
    --font-size-base: clamp(1rem, 3vw, 1.125rem);
    --font-size-lg: clamp(1.125rem, 3.5vw, 1.25rem);
    --font-size-xl: clamp(1.25rem, 4vw, 1.5rem);
    --font-size-2xl: clamp(1.5rem, 5vw, 2rem);
    --font-size-3xl: clamp(2rem, 6vw, 3rem);
    --font-size-4xl: clamp(2.5rem, 7vw, 4rem);
    
    /* Responsive Spacing */
    --spacing-xs: clamp(0.25rem, 1vw, 0.5rem);
    --spacing-sm: clamp(0.5rem, 2vw, 1rem);
    --spacing-md: clamp(1rem, 3vw, 1.5rem);
    --spacing-lg: clamp(1.5rem, 4vw, 2rem);
    --spacing-xl: clamp(2rem, 5vw, 3rem);
    --spacing-2xl: clamp(3rem, 6vw, 4rem);
    
    /* Container Widths */
    --container-xs: 100%;
    --container-sm: 540px;
    --container-md: 720px;
    --container-lg: 960px;
    --container-xl: 1140px;
    --container-xxl: 1320px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-color);
    scroll-behavior: smooth;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Performance optimizations */
img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive images */
.img-fluid {
    max-width: 100%;
    height: auto;
}

/* Touch targets for mobile */
@media (max-width: 767.98px) {
    .btn {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 20px;
    }
    
    .nav-link {
        min-height: 44px;
        padding: 12px 16px;
    }
}

/* Typography */
.section-title {
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 2rem;
}

.brand-gradient {
    background: linear-gradient(135deg, #ffffff, #f1f5f9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #ffffff; /* Fallback for browsers without gradient support */
}

/* Navigation */
.navbar {
    backdrop-filter: blur(15px);
    background-color: rgba(26, 13, 38, 0.95) !important;
    box-shadow: 0 2px 20px rgba(168, 85, 247, 0.1);
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light) !important;
}

.navbar-logo {
    height: 35px;
    width: auto;
    transition: transform 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.1);
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Hero Section - Enhanced Responsive */
.hero-section {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: var(--text-light);
    position: relative;
    overflow: hidden;
    padding-top: clamp(60px, 8vw, 100px);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    padding-top: 2rem;
    padding-bottom: 1rem;
}

.hero-logo-section {
    text-align: center;
}

.hero-logo {
    width: clamp(180px, 30vw, 280px);
    height: auto;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.hero-logo:hover {
    transform: scale(1.05);
}

.hero-title {
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--spacing-lg);
    font-size: var(--font-size-3xl);
}

@media (max-width: 576px) {
    .hero-title {
        font-size: var(--font-size-2xl);
        line-height: 1.3;
    }
}

.hero-title small {
    color: #ffffff !important;
    opacity: 0.9;
}

.hero-subtitle {
    color: #ffffff !important;
    opacity: 0.9;
}

.hero-subtitle {
    font-weight: 300;
    color: #ffffff !important;
    opacity: 0.9;
}

.hero-claim {
    font-size: 1.3rem;
    font-weight: 500;
    font-style: italic;
}

/* Stats Grid */
.stats-grid {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.stat-item {
    flex: 1;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.stat-number {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    color: #ffffff !important;
    line-height: 1;
}

.stat-label {
    font-size: clamp(0.75rem, 2vw, 0.9rem);
    opacity: 0.8;
    margin-top: 0.5rem;
}

/* Responsive Statistics */
@media (max-width: 768px) {
    .hero-stats .row {
        gap: 1rem;
    }
    
    .stat-item {
        margin-bottom: 1rem;
        padding: 1rem;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        backdrop-filter: blur(10px);
    }
}

/* Hero Stats Card - Responsive */
.hero-stats-card {
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(15px);
    border-radius: clamp(12px, 3vw, 20px);
    padding: clamp(1rem, 4vw, 2rem);
    color: var(--text-dark);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .hero-stats-card {
        margin-top: 2rem;
        padding: 1.5rem;
    }
}

.hero-stats-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.platform-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.platform-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 123, 255, 0.05);
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.platform-stat i {
    font-size: 2rem;
    color: var(--primary-color);
    width: 40px;
    text-align: center;
}

.platform-number {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 700;
    color: var(--dark-color);
}

.platform-name {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.mentions .badge {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
}

/* CTA Buttons - Responsive */
.cta-buttons {
    margin-top: var(--spacing-lg);
}

@media (max-width: 576px) {
    .cta-buttons {
        margin-top: var(--spacing-md);
    }
    
    .cta-buttons .btn {
        width: 100%;
        margin-bottom: 0.75rem;
    }
}

.btn {
    border-radius: 50px;
    padding: clamp(10px, 2vw, 12px) clamp(20px, 4vw, 30px);
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
    font-size: clamp(0.875rem, 2vw, 1rem);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.btn-outline-primary {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    background: transparent;
}

.btn-outline-primary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    color: white;
    transform: translateY(-2px);
}

/* Feature Cards */
.feature-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
    font-size: 2rem;
}

/* Service Cards */
.service-card {
    background: white;
    border-radius: clamp(12px, 3vw, 20px);
    padding: clamp(1.5rem, 4vw, 2rem);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .service-card {
        margin-bottom: 1.5rem;
    }
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-icon {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.service-icon i {
    font-size: clamp(2.5rem, 5vw, 3rem);
    color: var(--primary-color);
}

.service-image {
    position: relative;
    margin-bottom: 1.5rem;
    border-radius: 15px;
    overflow: hidden;
    height: 200px;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.05);
}

.service-number {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.service-list {
    list-style: none;
    padding: 0;
}

.service-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--secondary-color);
}

.service-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* Success Stats */
.success-stat {
    padding: 2rem 1rem;
}

.success-icon {
    font-size: 4rem;
    opacity: 0.8;
}

.success-number {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #ffffff !important;
}

.success-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Contact Cards */
.contact-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-message {
    margin-bottom: 1.5rem;
}

.contact-message .alert {
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 0;
    font-weight: 500;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-link {
    color: #007bff !important;
    text-decoration: none;
    font-weight: 500;
}

.contact-link:hover {
    text-decoration: underline;
}

.office-hours {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.office-hour-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--light-color);
    border-radius: 10px;
}

.day {
    font-weight: 600;
    color: var(--dark-color);
}

.time {
    font-weight: 500;
    color: var(--primary-color);
}

/* Social Links */
.social-links a {
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color) !important;
}

/* Footer Styles */
.footer-link {
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: white !important;
    text-decoration: none;
}

.social-links-footer .social-link {
    font-size: 1.5rem;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.social-links-footer .social-link:hover {
    color: var(--primary-color) !important;
    text-decoration: none;
    transform: translateY(-2px);
}

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

/* Contact Form Styles - Enhanced Mobile */
.contact-form .form-control,
.contact-form .form-select {
    border: 2px solid #e9ecef;
    border-radius: clamp(8px, 2vw, 10px);
    padding: clamp(10px, 2vw, 12px) clamp(12px, 3vw, 15px);
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    transition: all 0.3s ease;
    width: 100%;
}

@media (max-width: 576px) {
    .contact-form .form-control,
    .contact-form .form-select {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.contact-form .form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.contact-form .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.contact-form .form-check-label {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.contact-form .form-check-label a {
    text-decoration: none;
    font-weight: 500;
}

.contact-form .form-check-label a:hover {
    text-decoration: underline;
}

#formMessage {
    padding: 15px;
    border-radius: 10px;
    font-weight: 500;
}

#formMessage.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#formMessage.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .hero-stats-card {
        margin-top: 3rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .service-icon i {
        font-size: 2.5rem;
    }
    
    .success-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-claim {
        font-size: 1.1rem;
    }
    
    .btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .office-hour-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

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

.hero-content > * {
    animation: fadeInUp 0.6s ease-out;
}

.hero-content > *:nth-child(2) {
    animation-delay: 0.1s;
}

.hero-content > *:nth-child(3) {
    animation-delay: 0.2s;
}

.hero-content > *:nth-child(4) {
    animation-delay: 0.3s;
}

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

/* Focus styles for accessibility */
.btn:focus,
.nav-link:focus,
.contact-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Additional SEO & Performance Optimizations for 2025 */

/* Enhanced Loading Performance */
.lazy-load {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.lazy-load.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Core Web Vitals Optimization */
.hero-section {
    contain: layout style paint;
}

.service-card,
.testimonial-card {
    contain: layout paint;
}

/* Enhanced Mobile Touch Targets */
@media (max-width: 768px) {
    .btn,
    .nav-link,
    .social-link {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }
    
    /* Optimize form inputs for mobile */
    .form-control,
    .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
        -webkit-appearance: none;
        appearance: none;
    }
}

/* Advanced Responsive Grid */
@supports (display: grid) {
    .responsive-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
        gap: clamp(1rem, 3vw, 2rem);
    }
}

/* Modern Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

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

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

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