/* Custom styles for AutoZentrum Stein */

:root {
    --color-primary: #013142; /* Dark Blue */
    --color-primary-light: #265768;
    --color-secondary: #8a041b; /* Orange */
    --color-secondary-light: #924350;
    --color-dark: #222831;
    --color-light: #f5f5f7;
    --color-gray: #e0e0e0;
    --transition-speed: 0.3s;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 12px 20px rgba(0, 0, 0, 0.05);
    
    /* SEO & Accessibility - Core Web Vitals */
    --content-visibility-offset: 200px; /* For content-visibility optimization */
}

/* 
 * PERFORMANCE OPTIMIZATIONS
 * These CSS features help with Core Web Vitals metrics
 * which directly impact SEO rankings
 */

/* Use content-visibility for off-screen content to improve LCP (Largest Contentful Paint) */
.cv-auto {
    content-visibility: auto;
    contain-intrinsic-size: 0 500px; /* Approximate height to prevent layout shifts */
}

/* Add will-change hint for animated elements - improves CLS (Cumulative Layout Shift) */
/* Hardware acceleration for smoother animations on mobile */
.btn-primary, 
.btn-secondary, 
.service-card, 
.trust-item {
    will-change: transform;
    transform: translateZ(0); /* Force hardware acceleration */
}

/* Global Styles */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    font-family: 'Inter', sans-serif;
}

/* Micro-interactions */
.hover-grow {
    transition: transform var(--transition-speed);
}

.hover-grow:hover {
    transform: translateY(-5px);
}

.hover-shadow:hover {
    box-shadow: var(--box-shadow);
}
.logoText{
    color: var(--color-primary)!important;
}

/* Navigation */
.nav-link {
    position: relative;
    color: var(--color-dark);
    font-weight: 500;
    transition: color var(--transition-speed);
}

.nav-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--color-primary);
    transition: width var(--transition-speed);
}

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

.nav-link:hover:after {
    width: 100%;
}

/* Simple button animations */
.btn-primary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--color-primary);
    color: white;
    border-radius: 0.375rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary:hover {
    background-color: var(--color-primary-light);
    transform: translateY(-2px);
}

.btn-secondary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: white;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    border-radius: 0.375rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: white;
}

/* Header */
#header {
    transition: all var(--transition-speed);
}

#header.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
}

.location-badge {
    animation: fadeIn 1s;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    background-image: url('images/autozentrum-stein-hero.png');
    background-size: cover;
    background-position: center;
    padding-top: 80px;
}

.benefit-item {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.15);
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.2));
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
}

.benefit-item .material-icons {
    margin-right: 0.5rem;
}

/* Service Cards - Simple Tailwind-based hover effects */
.service-card {
    background-color: white;
    border-radius: 0.5rem;
    padding: 2rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.service-card .icon-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 70px;
    height: 70px;
    background-color: var(--color-light);
    border-radius: 50%;
    margin-bottom: 1.5rem;
    transition: background-color 0.3s ease;
}

.service-card:hover .icon-container {
    background-color: var(--color-primary);
}

.service-card .material-icons {
    font-size: 2rem;
    color: var(--color-primary);
    transition: color 0.3s ease;
}

.service-card:hover .material-icons {
    color: white;
}

.service-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--color-dark);
}

.service-description {
    color: #666;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.service-link {
    font-weight: 600;
    color: var(--color-primary);
    transition: color var(--transition-speed);
    display: inline-flex;
    align-items: center;
}

.service-link:after {
    content: '→';
    margin-left: 0.5rem;
    transition: transform var(--transition-speed);
    display: inline-block;
}

.service-link:hover {
    color: var(--color-secondary);
}

.service-link:hover:after {
    transform: translateX(5px);
}

/* Trust Items */
.trust-item {
    padding: 1.5rem;
    background-color: var(--color-light);
    border-radius: 0.5rem;
    transition: all var(--transition-speed);
}

.trust-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}

.trust-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
}

.trust-icon .material-icons {
    font-size: 1.5rem;
    color: var(--color-primary);
}

.trust-item h3 {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.trust-item p {
    color: #666;
    font-size: 0.95rem;
}

/* Form Styles */
input, select, textarea {
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 3px rgba(42, 93, 180, 0.1);
}

input[type="checkbox"] {
    cursor: pointer;
}

/* Loading Animation */
.loading {
    position: relative;
}

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive Fixes */
@media (max-width: 768px) {
    .hero-section {
        min-height: 80vh;
    }
    
    .service-card {
        margin-bottom: 1rem;
    }
    
    .btn-primary, .btn-secondary {
        display: block;
        width: 100%;
    }
}

/* Custom Form Inputs */
.form-input, .form-select, .form-textarea, .form-checkbox {
    border-width: 1px;
    border-color: #D1D5DB;
    border-radius: 0.375rem;
    padding: 0.625rem 0.75rem;
    width: 100%;
}

/* Remove all complex animations - keep it simple */

/* Google Map Style */
#map {
    position: relative;
}

#map iframe {
    border: 0;
    width: 100%;
    height: 100%;
    border-radius: 0.5rem;
}

/* AOS Animation Delay Classes */
.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

.delay-400 {
    transition-delay: 400ms;
}

/* Form Validation & Notification */
.form-input.error,
.form-select.error,
.form-checkbox.error {
    border-color: #f44336;
    box-shadow: 0 0 0 1px #f44336;
}

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: white;
    border-left: 4px solid #4CAF50;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 16px;
    width: 100%;
    max-width: 400px;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-success {
    border-left-color: #4CAF50;
}

.notification-error {
    border-left-color: #f44336;
}

.notification-content {
    display: flex;
    align-items: flex-start;
    padding-right: 16px;
}

.notification-content .material-icons {
    margin-right: 12px;
    font-size: 24px;
}

.notification-success .material-icons {
    color: #4CAF50;
}

.notification-error .material-icons {
    color: #f44336;
}

.notification-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.notification-close {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    color: #333;
}

.notification-close .material-icons {
    font-size: 18px;
}

.datenschutzCheckbox{
    width: 50px!important;
}
.text-blue-800{
    color: var(--color-primary)!important;
}

.h-15 {
    height: 3.5rem;
}

/* Back to Top Button - Enhanced styling */
#back-to-top {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: var(--color-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-speed);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#back-to-top.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    background-color: var(--color-primary-light);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

#back-to-top .material-icons {
    font-size: 24px;
    transition: transform var(--transition-speed);
}

#back-to-top:hover .material-icons {
    transform: translateY(-2px);
}

/* Mobile Performance Optimizations - Simple like webdesign */
@media (max-width: 768px) {
    /* Reduce animations on touch devices for better performance */
    .service-card:hover {
        transform: translateY(-5px); /* Reduced movement */
    }
    
    .service-card:hover .icon-container {
        transform: scale(1.05); /* Simplified transform */
    }
    
    /* Faster transitions on mobile */
    .service-card,
    .btn-primary,
    .btn-secondary {
        transition-duration: 0.2s;
    }
    
    /* Smaller back to top button on mobile */
    #back-to-top {
        width: 45px;
        height: 45px;
        bottom: 15px;
        right: 15px;
    }
    
    /* Enhanced touch targets */
    .btn-primary,
    .btn-secondary {
        min-height: 44px;
        padding: 0.875rem 1.75rem;
    }
}

/* Respect user's motion preferences - Simple like webdesign */
@media (prefers-reduced-motion: reduce) {
    .fade-in,
    .service-card,
    .btn-primary,
    .btn-secondary,
    .service-card .icon-container {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
    
    .fade-in {
        opacity: 1;
    }
}

/* iOS Safari specific optimizations - Simple like webdesign */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari optimizations */
    .service-card,
    .btn-primary,
    .btn-secondary,
    .fade-in {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-perspective: 1000px;
        perspective: 1000px;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
    
    /* Fix for iOS scroll momentum */
    body {
        -webkit-overflow-scrolling: touch;
    }
}