/* Maximum Features Block Styles */

.maximum-features-block {
    background: #f5f5f5;
    position: relative;
    padding: 80px 0;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
}

.maximum-features-block .mxf-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Text Content */
.mxf-text-content h1 {
    font-size: 44px;
    font-weight: 700;
    line-height: 1.4;
}
.maximum-features-block .mxf-text-content {
    text-align: center;
    margin-bottom: 60px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.maximum-features-block .mxf-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 20px 0;
    color: #333333;
}

.maximum-features-block .mxf-subheading {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
    margin: 0;
    color: #666666;
}

/* Features Section */
.maximum-features-block .mxf-features-section {
    margin-top: 40px;
}

.maximum-features-block .mxf-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: stretch;
}

/* Feature Item */
.maximum-features-block .mxf-feature-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Feature Image Wrapper */
.maximum-features-block .mxf-feature-image-wrapper {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    background: #000;
}

.maximum-features-block .mxf-feature-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Overlay - Dark semi-transparent at bottom */
.maximum-features-block .mxf-feature-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0) 100%);
    z-index: 2;
    transition: background 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    overflow: hidden;
    box-sizing: border-box;
}

/* Hover effect - darken entire image to 70% */
.maximum-features-block .mxf-feature-item:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
    pointer-events: none;
    transition: background 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.maximum-features-block .mxf-feature-item:hover .mxf-feature-image {
    transform: scale(1.05);
}

/* On hover, overlay covers full height and changes gradient */
.maximum-features-block .mxf-feature-item:hover .mxf-feature-overlay {
    background: rgba(0, 0, 0, 0);
}

/* Feature Content */
.maximum-features-block .mxf-feature-content {
    position: relative;
    z-index: 3;
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    max-height: none;
}

/* Hover styles are handled by JavaScript for smooth animation */
/* JavaScript will animate with transform, then switch to absolute positioning */

.maximum-features-block .mxf-feature-title {
    font-size: 27px;
    font-weight: 600;
    margin: 0;
    padding: 0;
    color: #ffffff;
    text-align: left;
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
    line-height: 1.3;
}

/* Title should not be clipped, but content should not exceed overlay bounds */
/* The overlay's overflow: hidden will clip any content that goes beyond */

/* Feature Description - hidden by default, appears under title */
/* Positioned absolutely relative to OVERLAY, NOT content - this ensures it never moves */
/* Overlay has constant padding: 20px, so description uses same padding */
/* Only opacity and visibility change, nothing else - all other properties are FIXED FOREVER */
.maximum-features-block .mxf-feature-description {
    font-size: 18px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    position: absolute;
    /* Positioned relative to OVERLAY, not content - overlay never changes */
    left: 20px;
    right: 20px;
    width: auto;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: left;
    z-index: 4;
    transform: none;
    will-change: opacity, visibility;
    /* Transition ONLY for opacity and visibility, nothing else */
    transition-property: opacity, visibility;
    transition-duration: 0.4s, 0.4s;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1), cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: 0.45s, 0.45s;
}

.maximum-features-block .mxf-feature-description p {
    margin: 0 0 8px 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    min-width: 100%;
    box-sizing: border-box;
}

.maximum-features-block .mxf-feature-description p:last-child {
    margin-bottom: 0;
}

.maximum-features-block .mxf-feature-description strong {
    font-weight: 600;
    color: #ffffff;
}

/* Hover effect - show description with fade in only */
/* Only opacity and visibility change, nothing else - all properties stay fixed */
.maximum-features-block .mxf-feature-item:hover .mxf-feature-description {
    opacity: 1;
    visibility: visible;
    /* Transition ONLY for opacity and visibility */
    transition-property: opacity, visibility;
    transition-duration: 0.4s, 0.4s;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1), cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: 0.45s, 0.45s;
    /* All other properties remain exactly the same - NO CHANGES AT ALL */
    position: absolute;
    left: 20px;
    right: 20px;
    width: auto;
    padding: 0;
    margin: 0;
    transform: none;
    box-sizing: border-box;
}

/* When not hovered, hide immediately without fade */
.maximum-features-block .mxf-feature-item:not(:hover) .mxf-feature-description {
    transition-property: opacity, visibility;
    transition-duration: 0s, 0s;
    transition-delay: 0s, 0s;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .maximum-features-block .mxf-features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 1024px) {
    .maximum-features-block {
        padding: 60px 0;
    }
    
    .maximum-features-block .mxf-features-grid {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .maximum-features-block {
        padding: 50px 0;
    }
    
    .maximum-features-block .mxf-title {
        font-size: 28px;
    }
    
    .maximum-features-block .mxf-subheading {
        font-size: 16px;
    }
    
    .maximum-features-block .mxf-features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .maximum-features-block .mxf-feature-overlay {
        padding: 16px;
    }
    
    /* Title and description keep same sizes as desktop */
    .maximum-features-block .mxf-feature-title {
        font-size: 27px;
    }
    
    .maximum-features-block .mxf-feature-description {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .mxf-text-content h1 {
    font-size: 22px;
}
    .maximum-features-block .mxf-container {
        padding: 0 15px;
    }
    
    .maximum-features-block .mxf-title {
        font-size: 24px;
        margin-bottom: 16px;
    }
    
    .maximum-features-block .mxf-subheading {
        font-size: 14px;
    }
    
    .maximum-features-block .mxf-text-content {
        margin-bottom: 40px;
    }
    
    .maximum-features-block .mxf-features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .maximum-features-block .mxf-feature-overlay {
        padding: 16px;
    }
    
    /* Title and description keep same sizes as desktop */
    .maximum-features-block .mxf-feature-title {
        font-size: 27px;
    }
    
    .maximum-features-block .mxf-feature-description {
        font-size: 18px;
    }
}

/* Entrance Animation */
.maximum-features-block .mxf-feature-item {
    opacity: 0;
    transform: translateY(30px);
    animation: mxf-fade-in-up 0.6s ease forwards;
}

.maximum-features-block .mxf-feature-item:nth-child(1) { animation-delay: 0.1s; }
.maximum-features-block .mxf-feature-item:nth-child(2) { animation-delay: 0.2s; }
.maximum-features-block .mxf-feature-item:nth-child(3) { animation-delay: 0.3s; }
.maximum-features-block .mxf-feature-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes mxf-fade-in-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accessibility */
.maximum-features-block .mxf-feature-item:focus {
    outline: 2px solid #ffffff;
    outline-offset: 4px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .maximum-features-block .mxf-feature-overlay {
        background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 50%, rgba(0, 0, 0, 0) 100%);
    }
}
