/**
 * Performance Optimizations CSS
 * Moving inline styles to external CSS for better performance
 * Generated with Claude Code
 */

/* ====================================================
   HERO SECTION OPTIMIZATIONS
   ==================================================== */

/* Hero section background - moved from inline styles */
#hero {
    background: linear-gradient(135deg, rgba(0, 180, 217, 0.1) 0%, rgba(29, 78, 137, 0.1) 100%);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
}

/* Dynamic background image will be added via CSS custom property */
#hero.has-custom-bg {
    background-image: var(--hero-bg-image);
}

/* Mobile optimization - remove fixed attachment for better performance */
@media (max-width: 768px) {
    #hero {
        background-attachment: scroll;
        min-height: 90vh;
    }
}

/* ====================================================
   LAZY LOADING STYLES
   ==================================================== */

/* Lazy loading placeholder */
img[data-src] {
    background: #f0f0f0;
    background-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><rect width="100%" height="100%" fill="%23f0f0f0"/><text x="50%" y="50%" text-anchor="middle" dy=".3em" fill="%23999">Laden...</text></svg>');
    background-size: cover;
    background-position: center;
}

/* Fade in effect for lazy loaded images */
img.lazy-loaded {
    animation: fadeIn 0.5s ease-in-out;
}

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

/* ====================================================
   FORM LOADING STATES
   ==================================================== */

/* Contact Form 7 loading states */
.wpcf7-form.loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.wpcf7-form.loading::after {
    content: 'Bezig met verzenden...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

/* Form success message */
.wpcf7-mail-sent-ok {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    position: relative;
}

.wpcf7-mail-sent-ok::before {
    content: '\f058'; /* FontAwesome check circle */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 10px;
    color: #28a745;
}

/* Form validation error messages */
.wpcf7-validation-errors {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.wpcf7-validation-errors::before {
    content: '\f071'; /* FontAwesome exclamation triangle */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 10px;
    color: #dc3545;
}

/* Individual field validation */
.wpcf7-form-control.wpcf7-not-valid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.wpcf7-not-valid-tip {
    color: #dc3545;
    font-size: 0.875em;
    margin-top: 0.25rem;
    display: block;
}

/* ====================================================
   MOBILE PERFORMANCE OPTIMIZATIONS
   ==================================================== */

@media (max-width: 768px) {
    /* Reduce resource-intensive effects on mobile */
    .performance-optimized,
    .hero-cta-button,
    .primary-cta-button,
    .secondary-cta-button,
    .contact-item,
    .form-message,
    .lazy-loaded {
        animation-duration: 0.3s;
    }

    /* Optimize hero section for mobile */
    #hero {
        background-size: cover;
        background-position: center center;
        /* Remove parallax effects that can cause performance issues */
        transform: none;
    }

    /* Optimize images for mobile */
    img {
        max-width: 100%;
        height: auto;
    }
}

/* ====================================================
   CRITICAL CSS FOR ABOVE-THE-FOLD CONTENT
   ==================================================== */

/* Header critical styles */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.header-topbar {
    background: rgba(0, 180, 217, 0.05);
    border-bottom: 1px solid rgba(0, 180, 217, 0.1);
    padding: 8px 0;
}

.header-topbar .contact-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1d4e89;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.contact-item:hover {
    color: #00b4d9;
}

.contact-item i {
    width: 16px;
    text-align: center;
}

/* Navigation critical styles */
#navigation {
    padding: 15px 0;
}

.site-branding img {
    height: 60px;
    width: auto;
}

.primary-cta-button,
.secondary-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.primary-cta-button {
    background: linear-gradient(135deg, #00b4d9 0%, #1d4e89 100%);
    color: white;
}

.primary-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 180, 217, 0.3);
}

.secondary-cta-button {
    background: transparent;
    color: #1d4e89;
    border-color: #1d4e89;
}

.secondary-cta-button:hover {
    background: #1d4e89;
    color: white;
}

/* Burger menu styles */
#burger-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: transparent;
    border: 2px solid #1d4e89;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#burger-menu span,
#burger-menu::before,
#burger-menu::after {
    content: '';
    display: block;
    height: 3px;
    width: 25px;
    background: #1d4e89;
    margin: 3px auto;
    transition: all 0.3s ease;
    border-radius: 2px;
}

#burger-menu.active span {
    transform: rotate(45deg);
    position: relative;
    top: 6px;
}

#burger-menu.active::before {
    transform: rotate(-45deg);
    position: relative;
    top: 9px;
}

#burger-menu.active::after {
    opacity: 0;
}

/* ====================================================
   PERFORMANCE HINTS
   ==================================================== */

/* Preload hints for critical resources */
.preload-hint {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Reduce repaints and reflows */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* Optimize animations for 60fps */
@media (prefers-reduced-motion: no-preference) {
    .smooth-animation {
        animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    }
}