/**
 * ELEMENTOR PAGES OPTIMIZATION - RENT ASSISTENZ
 * 
 * Optimiert Elementor-Seiten (Impressum, Datenschutz, etc.) für Corporate Design
 * Behebt Layout-Probleme und stellt Brand-Konsistenz sicher
 * 
 * @package RentAssistenz
 * @version 1.0.0 - Elementor Corporate Fix
 */

/* =============================================================================
   ELEMENTOR GLOBAL OPTIMIZATIONS
   ============================================================================= */

/* Elementor Container Optimization */
.elementor-page {
    background: var(--rent-bg-white, #ffffff) !important;
    color: var(--rent-text-primary, #333333) !important;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    line-height: 1.6 !important;
}

/* Elementor Section Styling */
.elementor-section {
    background: var(--rent-bg-white, #ffffff) !important;
}

.elementor-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 2rem 1rem !important;
}

/* =============================================================================
   ELEMENTOR TEXT CONTENT OPTIMIZATION
   ============================================================================= */

/* Headings in Elementor */
.elementor-widget-heading h1,
.elementor-widget-heading h2,
.elementor-widget-heading h3,
.elementor-widget-heading h4,
.elementor-widget-heading h5,
.elementor-widget-heading h6 {
    color: var(--rent-deep-blue, #053068) !important;
    font-weight: 700 !important;
    margin-bottom: 1.5rem !important;
}

.elementor-widget-heading h1 {
    font-size: 2.5rem !important;
    margin-bottom: 2rem !important;
    text-align: center !important;
}

.elementor-widget-heading h2 {
    font-size: 2rem !important;
    margin-top: 3rem !important;
    margin-bottom: 1.5rem !important;
}

.elementor-widget-heading h3 {
    font-size: 1.5rem !important;
    color: var(--rent-primary-blue, #007cba) !important;
    margin-top: 2rem !important;
}

/* Paragraph Text in Elementor */
.elementor-widget-text-editor p,
.elementor-text-editor p {
    color: var(--rent-text-primary, #333333) !important;
    font-size: 1.125rem !important; /* 18px - Senior-friendly */
    line-height: 1.7 !important;
    margin-bottom: 1.5rem !important;
    text-align: left !important;
}

/* Strong/Bold Text */
.elementor-widget-text-editor strong,
.elementor-text-editor strong {
    color: var(--rent-deep-blue, #053068) !important;
    font-weight: 700 !important;
}

/* Links in Elementor Content */
.elementor-widget-text-editor a,
.elementor-text-editor a {
    color: var(--rent-primary-blue, #007cba) !important;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 124, 186, 0.3) !important;
    transition: all 0.3s ease !important;
}

.elementor-widget-text-editor a:hover,
.elementor-text-editor a:hover {
    color: var(--rent-deep-blue, #053068) !important;
    border-bottom-color: var(--rent-deep-blue, #053068) !important;
}

/* =============================================================================
   ELEMENTOR LISTS OPTIMIZATION
   ============================================================================= */

/* List Styling */
.elementor-widget-text-editor ul,
.elementor-widget-text-editor ol,
.elementor-text-editor ul,
.elementor-text-editor ol {
    margin-left: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

.elementor-widget-text-editor li,
.elementor-text-editor li {
    color: var(--rent-text-primary, #333333) !important;
    font-size: 1.125rem !important; /* 18px */
    line-height: 1.6 !important;
    margin-bottom: 0.75rem !important;
}

/* =============================================================================
   IMPRESSUM & DATENSCHUTZ SPECIFIC STYLING
   ============================================================================= */

/* Corporate Contact Information Styling */
.elementor-widget-text-editor .contact-info,
.elementor-text-editor .contact-info {
    background: var(--rent-bg-light, #f8f9fa) !important;
    border-left: 4px solid var(--rent-primary-blue, #007cba) !important;
    padding: 2rem !important;
    margin: 2rem 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.1) !important;
}

/* Legal Text Sections */
.elementor-widget-text-editor .legal-section,
.elementor-text-editor .legal-section {
    margin: 2rem 0 !important;
    padding: 1.5rem !important;
    border: 1px solid var(--rent-border-light, #e9ecef) !important;
    border-radius: 8px !important;
    background: var(--rent-bg-white, #ffffff) !important;
}

/* =============================================================================
   ELEMENTOR RESPONSIVE OPTIMIZATION
   ============================================================================= */

/* Tablet Responsive */
@media (max-width: 768px) {
    .elementor-container {
        padding: 1.5rem 1rem !important;
    }
    
    .elementor-widget-heading h1 {
        font-size: 2rem !important;
        text-align: left !important;
    }
    
    .elementor-widget-heading h2 {
        font-size: 1.75rem !important;
        margin-top: 2rem !important;
    }
    
    .elementor-widget-heading h3 {
        font-size: 1.25rem !important;
        margin-top: 1.5rem !important;
    }
    
    .elementor-widget-text-editor p,
    .elementor-text-editor p {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .elementor-container {
        padding: 1rem 0.75rem !important;
    }
    
    .elementor-widget-heading h1 {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
    }
    
    .elementor-widget-heading h2 {
        font-size: 1.5rem !important;
    }
    
    .elementor-widget-heading h3 {
        font-size: 1.125rem !important;
    }
    
    .elementor-widget-text-editor p,
    .elementor-text-editor p,
    .elementor-widget-text-editor li,
    .elementor-text-editor li {
        font-size: 0.9rem !important;
    }
    
    .elementor-widget-text-editor ul,
    .elementor-widget-text-editor ol,
    .elementor-text-editor ul,
    .elementor-text-editor ol {
        margin-left: 1rem !important;
    }
}

/* =============================================================================
   ELEMENTOR SPACING & LAYOUT FIXES
   ============================================================================= */

/* Remove Excessive Elementor Margins */
.elementor-widget-wrap {
    margin: 0;
}

.elementor-element {
    margin-bottom: 1rem !important;
}

/* Consistent Spacing */
.elementor-widget:not(:last-child) {
    margin-bottom: 2rem !important;
}

/* =============================================================================
   ELEMENTOR ACCESSIBILITY IMPROVEMENTS
   ============================================================================= */

/* Focus States for Keyboard Navigation */
.elementor-widget-text-editor a:focus,
.elementor-text-editor a:focus {
    outline: 2px solid var(--rent-primary-blue, #007cba) !important;
    outline-offset: 2px !important;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .elementor-widget-text-editor,
    .elementor-text-editor {
        color: #000000 !important;
        background: #ffffff !important;
    }
    
    .elementor-widget-text-editor a,
    .elementor-text-editor a {
        color: #000000 !important;
        border-bottom: 2px solid #000000 !important;
    }
}

/* =============================================================================
   ELEMENTOR PRINT OPTIMIZATION
   ============================================================================= */

@media print {
    .elementor-section,
    .elementor-container {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    .elementor-widget-text-editor a,
    .elementor-text-editor a {
        color: black !important;
        text-decoration: underline !important;
        border-bottom: none !important;
    }
    
    .elementor-widget-text-editor a:after,
    .elementor-text-editor a:after {
        content: " (" attr(href) ")" !important;
        font-size: 0.8em !important;
        color: #666666 !important;
    }
}

/* =============================================================================
   SENIOR-UX OPTIMIZATIONS FOR ELEMENTOR
   ============================================================================= */

/* Larger Click Targets */
.elementor-widget-text-editor a,
.elementor-text-editor a {
    padding: 0.25rem 0 !important;
    min-height: 44px !important; /* WCAG 2.1 AA Compliance */
    display: inline-block !important;
}

/* Reduced Animation for Senior Users */
@media (prefers-reduced-motion: reduce) {
    .elementor-widget-text-editor a,
    .elementor-text-editor a {
        transition: none !important;
    }
}

/* Enhanced Readability */
.elementor-widget-text-editor,
.elementor-text-editor {
    font-weight: 400 !important;
    letter-spacing: 0.02em !important;
    word-spacing: 0.1em !important;
}