/* Main CSS - Non-critical styles loaded asynchronously */

/* Font Loading Optimization */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/inter.woff2') format('woff2');
}

@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/space-grotesk.woff2') format('woff2');
}

/* Stats Section */
.stats {
    background: white;
    padding: 3rem 0;
    box-shadow: var(--shadow-sm);
    border-top: 1px solid #e5e7eb;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 1rem;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    display: block;
    line-height: 1;
}

.stat-label {
    color: var(--medium-gray);
    font-weight: 500;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* Section Styles */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-badge {
    display: inline-block;
    background: var(--light-blue);
    color: var(--primary-blue);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-title {
    font-family: var(--font-space);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
    line-height: 1.2;
}

.section-description {
    font-size: 1.125rem;
    color: var(--medium-gray);
    line-height: 1.6;
}

/* Services Section */
.services {
    padding: 5rem 0;
    background: var(--light-gray);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-blue);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: white;
    box-shadow: var(--shadow-md);
}

.service-title {
    font-family: var(--font-space);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
    line-height: 1.3;
}

.service-description {
    color: var(--medium-gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.service-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.service-link::after {
    content: '→';
    transition: transform 0.3s ease;
}

.service-link:hover {
    gap: 0.75rem;
    color: var(--primary-blue-dark);
}

.service-link:hover::after {
    transform: translateX(4px);
}

/* About Section */
.about {
    padding: 5rem 0;
    background: white;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text {
    max-width: 500px;
}

.about-image {
    position: relative;
}

.about-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.about-features {
    list-style: none;
    display: grid;
    gap: 1rem;
    margin: 2rem 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.feature-icon {
    width: 24px;
    height: 24px;
    background: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    flex-shrink: 0;
}

/* Testimonials */
.section-spacing {
    margin-bottom: 80px;
}

.testimonials {
    padding: 5rem 0;
    background: var(--light-gray);
}

.testimonial-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 2rem;
    font-size: 4rem;
    color: var(--primary-blue);
    font-family: serif;
    opacity: 0.3;
}

.testimonial-text {
    font-size: 1.125rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-style: italic;
    line-height: 1.6;
}

.testimonial-author {
    color: var(--primary-blue);
    font-weight: 600;
    font-style: normal;
}

/* Contact Section */
.contact {
    padding: 5rem 0;
    background: var(--dark-gray);
    color: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h2 {
    color: white;
    margin-bottom: 1rem;
}

.contact-description {
    color: #d1d5db;
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.contact-details {
    display: grid;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-icon {
    font-size: 1.2rem;
    margin-top: 0.2rem;
}

.contact-item strong {
    display: block;
    color: white;
    margin-bottom: 0.25rem;
}

.contact-item a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--accent-blue);
}

.contact-item address {
    font-style: normal;
    color: #d1d5db;
    line-height: 1.4;
}

/* Partner Section */
.partners {
    padding: 5rem 0;
    background: white;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.partner-card {
    text-decoration: none;
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.partner-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-blue);
    background: white;
    text-decoration: none;
}

.partner-logo {
    width: 100%;
    max-width: 280px;
    height: auto;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.partner-card:hover .partner-logo {
    transform: scale(1.02);
}

.partner-info h3 {
    font-family: var(--font-space);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.partner-info p {
    color: var(--medium-gray);
    line-height: 1.6;
    font-size: 0.95rem;
}
.fernwartung {
    padding: 5rem 0;
    background: white;
}

.fernwartung-content {
    display: grid;
    gap: 4rem;
    margin-top: 3rem;
}

.fernwartung-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step {
    text-align: center;
    padding: 2rem 1rem;
    background: var(--light-gray);
    border-radius: 16px;
    transition: transform 0.3s ease;
}

.step:hover {
    transform: translateY(-5px);
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0 auto 1rem;
    box-shadow: var(--shadow-md);
}

.step h3 {
    font-family: var(--font-space);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.step p {
    color: var(--medium-gray);
    font-size: 0.9rem;
}

.fernwartung-downloads {
    display: flex;
    gap: 3rem;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--gradient-primary);
    color: white;
    padding: 2rem 3rem;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    justify-content: center;
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
    background: var(--gradient-secondary);
}

.download-icon {
    font-size: 2rem;
}

.download-btn strong {
    display: block;
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.download-btn small {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.download-info {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 12px;
    max-width: 400px;
    text-align: left;
}

.download-info p {
    margin-bottom: 1rem;
}

.download-info ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.download-info li {
    margin-bottom: 0.5rem;
    color: var(--medium-gray);
}

.download-info small {
    color: var(--medium-gray);
    font-style: italic;
}

/* Footer */
.footer {
    background: #111827;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo img {
    background: #f3f4f6;
    padding: 6px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);

    /* Sharpness fixes */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    transform: translateZ(0);   /* forzierte GPU-Schärfe */
}



.footer-name {
    font-family: var(--font-space);
    font-weight: 600;
    font-size: 1.125rem;
}

.footer-description {
    color: #d1d5db;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.footer-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
}

.footer-title {
    font-family: var(--font-space);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

.footer-links {
    list-style: none;
    display: grid;
    gap: 0.75rem;
}

.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-blue);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright {
    color: #9ca3af;
    font-size: 0.875rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #374151;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary-blue);
    transform: translateY(-2px);
}

/* Modal Overlay */
.legal-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.legal-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* iOS Fix: Force rendering */
.legal-modal-overlay {
    position: fixed !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.legal-modal-overlay:not(.active) {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.legal-modal-overlay.active {
    display: flex !important;
}


/* Modal Container */
.legal-modal {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 1200px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

/* Modal Header */
.legal-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: 16px 16px 0 0;
}

.legal-modal-header.datenschutz {
    background: var(--gradient-secondary);
}

.legal-modal-title {
    font-family: var(--font-space);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.legal-modal-icon {
    font-size: 1.75rem;
}

.legal-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    min-width: 44px;
    min-height: 44px;
}

.legal-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Modal Content */
.legal-modal-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.legal-modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Loading State */
.legal-modal-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    z-index: 10;
    gap: 1rem;
}

.legal-modal-loading.hidden {
    display: none;
}

.legal-modal-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--light-gray);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.legal-modal-loading-text {
    color: var(--medium-gray);
    font-weight: 500;
}

/* Modal Footer */
.legal-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    border-top: 1px solid var(--light-gray);
    background: #f8fafc;
}

.legal-modal-external {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--medium-gray);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 6px;
    min-height: 44px;
}

.legal-modal-external:hover {
    color: var(--primary-blue);
    background: var(--light-blue);
}

.legal-modal-button {
    padding: 0.75rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font-inter);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    min-height: 44px;
}

.legal-modal-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive - iOS optimiert */
@media (max-width: 768px) {
    .legal-modal-overlay {
        padding: 0;
    }

    .legal-modal {
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }

    .legal-modal-header {
        padding: 1rem 1.5rem;
        border-radius: 0;
    }

    .legal-modal-title {
        font-size: 1.125rem;
    }

    .legal-modal-icon {
        font-size: 1.5rem;
    }

    .legal-modal-footer {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem 1.5rem;
    }

    .legal-modal-button,
    .legal-modal-external {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .legal-modal-header {
        padding: 0.875rem 1rem;
    }

    .legal-modal-title {
        font-size: 1rem;
        gap: 0.5rem;
    }

    .legal-modal-close {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .legal-modal-overlay,
    .legal-modal {
        animation: none;
    }
    
    .legal-modal-spinner {
        animation-duration: 2s;
    }
}
