
/* Fullscreen Hero Setup */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden;
}

/* Hero section with background image approach - Optimized */
.front-emotion {
    position: relative;
    width: 100vw;
    height: 70vh;
    min-height: 450px;
    max-height: 800px;
    
    /* Break out of container */
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    
    /* Background image approach for perfect fit */
    background-image: url('/static/images/hero-perfect/familie-perfect-desktop-16-9.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll; /* Changed from fixed for better mobile performance */
    
    /* Perfect centering and overflow handling */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Smooth transitions */
    transition: height 0.3s ease;
}

/* Background image optimization */
.front-emotion {
    background-attachment: fixed;
    background-blend-mode: normal;
}

/* Remove any potential margins/padding on container elements */
.container-fluid {
    padding: 0 !important;
    margin: 0 !important;
}

/* Ensure sharp rendering on high-DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .front-emotion {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Overlay elements positioning */
.pricing,
.title-strap,
.calculator-main {
    position: absolute;
    z-index: 10;
}

/* Price Circle Positioning */
.pricing {
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pricing-white {
    text-align: center;
    color: #333;
}

.pricing .text-smaller {
    font-size: 0.75rem;
    color: #666;
    margin: 2px 0;
}

.pricing .h3 {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--heizoel-green, #3b961a);
    margin: 4px 0;
}

/* Title Banner */
.title-strap {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--heizoel-green, #3b961a);
    color: white;
    padding: 15px 30px;
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

/* Calculator positioning */
.calculator-main {
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
}

.calculator-box {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.calculator-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--heizoel-green, #3b961a);
}

/* Settings icon removed */

.input-group-container {
    display: flex;
    gap: 15px;
    align-items: end;
    justify-content: center;
    flex-wrap: wrap;
}

.input-field {
    display: flex;
    flex-direction: column;
    min-width: 120px;
}

.input-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
}

.form-input {
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--heizoel-green, #3b961a);
}

.submit-field {
    display: flex;
    align-items: end;
}

.btn-starten {
    background: var(--heizoel-green, #3b961a);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.btn-starten:hover {
    background: #2d7014;
}

/* Responsive breakpoints with different background images */
/* Enhanced Mobile Responsive Design */
@media (max-width: 576px) {
    .front-emotion {
        width: 100vw;
        height: 50vh;
        min-height: 350px;
        max-height: 500px;
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        background-image: url('/static/images/hero-perfect/familie-perfect-mobile-9-16.webp');
        background-attachment: scroll;
    }
    
    /* Mobile navigation adjustments */
    .navbar {
        padding: 0.5rem 1rem;
    }
    
    .navbar-brand img {
        height: 35px;
    }
    
    /* Mobile calculator adjustments */
    .calculator-main {
        bottom: 15px;
        width: 95%;
        padding: 0 10px;
    }
    
    .calculator-box {
        padding: 15px;
        border-radius: 8px;
    }
    
    /* Mobile calculator header adjustments */
    .calculator-header {
        font-size: 1.1rem;
    }
    
    .calculator-header {
        font-size: 1.1rem;
    }
    
    .input-group-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-input {
        padding: 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .btn-starten {
        width: 100%;
        padding: 14px;
        font-size: 16px;
    }
    
    /* Mobile pricing circle */
    .pricing {
        width: 90px;
        height: 90px;
        top: 10px;
        right: 10px;
    }
    
    .pricing .h3 {
        font-size: 1rem;
    }
    
    .pricing .text-smaller {
        font-size: 0.65rem;
    }
    
    /* Mobile title banner */
    .title-strap {
        padding: 10px 15px;
        font-size: 1.2rem;
        max-width: 95%;
        white-space: normal;
        text-align: center;
        line-height: 1.2;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .front-emotion {
        width: 100vw;
        height: 55vh;
        min-height: 400px;
        max-height: 600px;
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        background-image: url('/static/images/hero-perfect/familie-perfect-mobile-9-16.webp');
    }
    
    /* Tablet adjustments */
    .calculator-main {
        bottom: 20px;
        width: 90%;
    }
    
    .input-group-container {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .input-field {
        flex: 1;
        min-width: 120px;
    }
    
    .submit-field {
        flex: 1;
        min-width: 150px;
    }
}
    
    /* Mobile pricing circle */
    .pricing {
        width: 100px;
        height: 100px;
        top: 15px;
        right: 15px;
    }
    
    .pricing .h3 {
        font-size: 1.1rem;
    }
    
    .pricing .text-smaller {
        font-size: 0.7rem;
    }
    
    /* Mobile title banner */
    .title-strap {
        padding: 12px 20px;
        font-size: 1.5rem;
        max-width: 90%;
    }
    
    /* Mobile calculator */
    .calculator-main {
        bottom: 20px;
        width: 95%;
    }
    
    .calculator-box {
        padding: 20px;
    }
    
    .input-group-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .input-field {
        width: 100%;
        min-width: auto;
    }
    
    .form-input {
        padding: 10px 12px;
    }
    
    .btn-starten {
        width: 100%;
        padding: 14px 20px;
        margin-top: 10px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .front-emotion {
        width: 100vw;
        height: 65vh;
        min-height: 500px;
        max-height: 700px;
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        background-image: url('/static/images/hero-perfect/familie-perfect-tablet-4-3.webp');
    }
    
    /* Fallback for browsers without WebP support */
    .no-webp .front-emotion {
        background-image: url('/static/images/hero-perfect/familie-perfect-tablet-4-3.jpg');
    }
}
    
    /* Tablet pricing circle */
    .pricing {
        width: 110px;
        height: 110px;
        top: 18px;
        right: 18px;
    }
    
    .pricing .h3 {
        font-size: 1.15rem;
    }
    
    /* Tablet title banner */
    .title-strap {
        padding: 14px 25px;
        font-size: 1.8rem;
    }
    
    /* Tablet calculator */
    .calculator-main {
        bottom: 25px;
        width: 85%;
        max-width: 550px;
    }
    
    .input-group-container {
        gap: 12px;
    }
}

@media (min-width: 1025px) and (max-width: 1200px) {
    .front-emotion {
        width: 100vw;
        height: 70vh;
        min-height: 600px;
        max-height: 800px;
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        background-image: url('/static/images/hero-perfect/familie-perfect-desktop-16-10.webp');
    }
    
    /* Fallback for browsers without WebP support */
    .no-webp .front-emotion {
        background-image: url('/static/images/hero-perfect/familie-perfect-desktop-16-10.jpg');
    }
}

@media (min-width: 1201px) {
    .front-emotion {
        width: 100vw;
        height: 75vh;
        min-height: 650px;
        max-height: 900px;
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        background-image: url('/static/images/hero-perfect/familie-perfect-desktop-16-9.webp');
    }
    
    /* Fallback for browsers without WebP support */
    .no-webp .front-emotion {
        background-image: url('/static/images/hero-perfect/familie-perfect-desktop-16-9.jpg');
    }
}

/* Ultrawide screens */
@media (min-width: 2000px) {
    .front-emotion {
        background-image: url('/static/images/hero-perfect/familie-perfect-ultrawide-21-9.webp');
    }
    
    /* Fallback for browsers without WebP support */
    .no-webp .front-emotion {
        background-image: url('/static/images/hero-perfect/familie-perfect-ultrawide-21-9.jpg');
    }
}

/* Ensure content remains accessible */
.front-emotion::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 2;
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Use higher quality images for retina displays */
}
