/* critical.css - Above-the-Fold Styles für meldeadresse.eu */
/* Diese Datei sollte inline im <head> eingebettet oder als erste CSS-Datei geladen werden */

/* =================================================================
   RESET & BASE STYLES
   ================================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Telex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #edeeee;
    color: #919691;
    line-height: 1.4;
    font-size: 14px;
    overflow-x: hidden;
}

/* =================================================================
   FONT LOADING & DISPLAY
   ================================================================= */

@font-face {
    font-family: 'Telex';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/telex-regular.woff2') format('woff2'),
         url('/fonts/telex-regular.woff') format('woff');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153;
}

/* =================================================================
   ACCESSIBILITY & SKIP LINKS
   ================================================================= */

.skip-links {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #0069B4;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    z-index: 9999;
    font-size: 14px;
    font-weight: bold;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.skip-links:focus {
    top: 0;
    transform: translateY(0);
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* =================================================================
   FOCUS MANAGEMENT
   ================================================================= */

*:focus {
    outline: 2px solid #0069B4;
    outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #0069B4;
    outline-offset: 2px;
}

/* =================================================================
   MAIN CONTAINER
   ================================================================= */

.container {
    position: relative;
    margin: 50px auto;
    max-width: 1200px;
    background-color: #FFFFFF;
    border: 1px solid #0080C8;
    box-shadow: 6px 6px 6px rgba(78, 80, 79, 0.8);
    min-height: 600px;
}

/* =================================================================
   HEADER STYLES
   ================================================================= */

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #FFFFFF;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
    z-index: 100;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #0069B4;
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo:hover {
    color: #0080C8;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.contact-info {
    font-size: 10px;
    color: #919691;
    text-align: right;
}

.contact-info a {
    color: #919691;
    text-decoration: none;
}

.contact-info a:hover {
    color: #0069B4;
    text-decoration: underline;
}

.header-chat-button {
    background: #0069B4;
    color: #FFFFFF;
    padding: 8px 15px;
    border: none;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.header-chat-button:hover {
    background: #0080C8;
    transform: translateY(-1px);
}

/* =================================================================
   NAVIGATION
   ================================================================= */

#navigationMenu {
    height: 35px;
    font-family: 'Telex', sans-serif;
    font-size: 12px;
    background-color: #0069B4;
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 90;
}

#navigationMenu li {
    display: inline-block;
    height: 35px;
    list-style-type: none;
    overflow: hidden;
    margin-top: 6px;
    padding-left: 3px;
    position: relative;
}

#navigationMenu li a {
    text-decoration: none;
    outline: none;
    padding: 5px 15px;
    display: block;
    color: #FFFFFF;
    background-color: #0069B4;
    transition: all 0.3s ease;
}

.normalMenu:hover,
.normalMenu:focus {
    background-color: #0080C8;
}

.selectedMenu {
    background-color: #0080C8 !important;
    color: #FFFFFF !important;
    font-weight: bold;
}

/* =================================================================
   HERO SECTION
   ================================================================= */

.hero {
    padding: 40px 20px;
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 105, 180, 0.05), rgba(0, 128, 200, 0.05));
}

.hero h1,
.hero h3 {
    font-size: 32px;
    color: #0069B4;
    font-weight: bold;
    margin-bottom: 20px;
    padding: 0;
    line-height: 1.2;
}

.hero p,
.hero .hero-description {
    margin-bottom: 40px;
    padding: 0;
    font-size: 14px;
    line-height: 1.5;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* =================================================================
   PRICING INFO
   ================================================================= */

.pricing-info {
    background: #f8f9fa;
    padding: 20px;
    margin: 30px 0;
    border: 1px solid #e2e8f0;
    text-align: center;
    border-radius: 4px;
}

.pricing-info h4 {
    font-size: 16px;
    color: #0069B4;
    margin-bottom: 10px;
    font-weight: bold;
    padding: 0;
}

.pricing-info p {
    color: #919691;
    font-size: 12px;
    line-height: 1.4;
    padding: 0;
    margin: 0 0 20px 0;
}

/* =================================================================
   CONTRACT SELECTOR
   ================================================================= */

.contract-selector {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    border: none;
    padding: 0;
}

.contract-option {
    background: #FFFFFF;
    border: 2px solid #e2e8f0;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 120px;
    position: relative;
}

.contract-option:hover {
    border-color: #0069B4;
    background: #f8f9fa;
    transform: translateY(-1px);
}

.contract-option.selected {
    border-color: #0069B4;
    background: #0069B4;
    color: #FFFFFF;
}

.contract-option .duration {
    font-size: 14px;
    font-weight: bold;
    color: #0069B4;
    margin-bottom: 5px;
}

.contract-option.selected .duration {
    color: #FFFFFF;
}

.contract-option .price-info {
    font-size: 10px;
    color: #919691;
    line-height: 1.2;
}

.contract-option.selected .price-info {
    color: #FFFFFF;
}

.contract-option .discount {
    background: #28a745;
    color: #FFFFFF;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 3px;
    position: absolute;
    top: -8px;
    right: -8px;
    font-weight: bold;
}

.selected-contract-info {
    margin-top: 15px;
    padding: 10px;
    background: #e8f4f8;
    border-radius: 4px;
    color: #0069B4;
    font-size: 12px;
    font-weight: bold;
}

/* =================================================================
   SERVICES GRID
   ================================================================= */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-card {
    background: #FFFFFF;
    border: 1px solid #0080C8;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 2px 2px 4px rgba(78, 80, 79, 0.3);
    position: relative;
    border-radius: 4px;
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: 6px 6px 12px rgba(78, 80, 79, 0.4);
}

.service-card:focus {
    transform: translateY(-3px);
    box-shadow: 6px 6px 12px rgba(78, 80, 79, 0.4);
}

.service-card h3,
.service-card h4 {
    font-size: 20px;
    color: #0069B4;
    margin-bottom: 15px;
    font-weight: bold;
    padding: 0;
    line-height: 1.3;
}

.service-price {
    font-size: 24px;
    font-weight: bold;
    color: #0069B4;
    margin-bottom: 10px;
}

.service-price span {
    font-size: 12px;
    color: #919691;
    font-weight: normal;
}

.service-features {
    list-style: none;
    margin: 20px 0;
    text-align: left;
    min-height: 120px;
}

.service-features li {
    padding: 4px 0;
    color: #919691;
    font-size: 11px;
    line-height: 1.3em;
    position: relative;
    padding-left: 15px;
}

.service-features li::before {
    content: "–";
    position: absolute;
    left: 0;
    color: #919691;
    font-weight: normal;
}

.service-button {
    background: #0069B4;
    color: #FFFFFF;
    padding: 8px 20px;
    border: none;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    border-radius: 4px;
}

.service-button:hover {
    background: #0080C8;
    transform: translateY(-1px);
}

/* =================================================================
   LOADING STATES
   ================================================================= */

.loading {
    opacity: 0.7;
    pointer-events: none;
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =================================================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ================================================================= */

@media (max-width: 768px) {
    .container {
        margin: 20px 10px;
    }
    
    .header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 15px;
    }
    
    .header-right {
        flex-direction: column;
        gap: 10px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .service-card {
        padding: 20px 15px;
    }
    
    .hero h1,
    .hero h3 {
        font-size: 24px;
    }
    
    #navigationMenu {
        flex-wrap: wrap;
        justify-content: center;
        height: auto;
        padding: 5px 0;
    }
    
    #navigationMenu li {
        float: none;
        margin: 2px;
    }
    
    .contract-selector {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .contract-option {
        min-width: auto;
        padding: 10px 15px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 12px;
    }
    
    .hero {
        padding: 20px 15px;
    }
    
    .hero h1,
    .hero h3 {
        font-size: 20px;
    }
    
    .service-card h3,
    .service-card h4 {
        font-size: 18px;
    }
    
    .service-price {
        font-size: 20px;
    }
    
    .contract-option {
        padding: 8px 12px;
    }
    
    .contract-option .duration {
        font-size: 12px;
    }
}

/* =================================================================
   HIGH CONTRAST MODE
   ================================================================= */

@media (prefers-contrast: high) {
    .service-card {
        border: 3px solid #000;
    }
    
    .service-button,
    .header-chat-button {
        border: 2px solid #000;
    }
    
    .contract-option {
        border: 2px solid #000;
    }
}

/* =================================================================
   REDUCED MOTION
   ================================================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .skip-links {
        transition: none;
    }
}

/* =================================================================
   DARK MODE SUPPORT
   ================================================================= */

@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    .container {
        background-color: #2a2a2a;
        border-color: #444;
    }
    
    .header {
        background-color: #2a2a2a;
        border-bottom-color: #444;
    }
    
    .service-card {
        background-color: #333;
        border-color: #555;
        color: #e0e0e0;
    }
    
    .pricing-info {
        background-color: #333;
        border-color: #555;
    }
    
    .contract-option {
        background-color: #333;
        border-color: #555;
        color: #e0e0e0;
    }
    
    .selected-contract-info {
        background-color: #2a4a5a;
    }
}

/* =================================================================
   PRINT STYLES
   ================================================================= */

@media print {
    .skip-links,
    .header-chat-button,
    #navigationMenu,
    .service-button {
        display: none;
    }
    
    .container {
        box-shadow: none;
        border: 1px solid #000;
        margin: 0;
    }
    
    .service-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* =================================================================
   ENSURE TEXT REMAINS VISIBLE DURING WEBFONT LOADS
   ================================================================= */

.logo,
.hero h1,
.hero h3 {
    font-display: swap;
}

/* =================================================================
   PREVENT LAYOUT SHIFT (CLS OPTIMIZATION)
   ================================================================= */

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.hero img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
}

/* =================================================================
   PERFORMANCE OPTIMIZATIONS
   ================================================================= */

/* GPU acceleration for animations */
.service-card,
.contract-option,
.service-button,
.header-chat-button {
    will-change: transform;
}

/* Optimize repaints */
.service-card:hover,
.service-card:focus {
    will-change: auto;
}