/* Features Page Styles */
.features-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.features-header {
    text-align: center;
    padding: 40px 0;
}

.features-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.features-header p {
    font-size: 1.2rem;
    color: #7f8c8d;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Feature Section Layout */
.feature-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    min-height: 600px;
    margin-bottom: 80px;
}

/* Left Side - Image */
.feature-left {
    position: relative;
}

.feature-image-container {
    position: relative;
    border-radius: 20px;
    overflow: visible !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    padding: 20px;
    background: transparent;
    min-height: 450px !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center;
    width: 100%;
}

.feature-image-container:hover {
    transform: translateY(-10px);
}

.feature-image {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 400px !important;
    object-fit: contain !important;
    object-position: top !important;
    display: block !important;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    pointer-events: none;
}

.before-after-slider {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 80%;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
    pointer-events: auto;
    cursor: ew-resize;
    transition: all 0.3s ease;
}

.before-after-slider:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.slider-handle:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.slider-arrow {
    font-size: 18px;
    color: #667eea;
    font-weight: bold;
}

/* Right Side - Content */
.feature-right {
    padding: 20px;
}

.feature-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 25px;
    line-height: 1.2;
}

.feature-content p {
    font-size: 1.1rem;
    color: #5a6c7d;
    line-height: 1.7;
    margin-bottom: 40px;
}

/* Demo Chart */
.demo-chart {
    background: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 30px;
    box-shadow: none;
    border: none;
}

.demo-chart h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.chart-container {
    position: relative;
    height: 200px;
    margin-bottom: 20px;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #5a6c7d;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

/* CTA Button */
.cta-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    width: fit-content;
    display: inline-block;
    text-decoration: none;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.cta-button:active {
    transform: translateY(0);
}

/* Enhanced Responsive Design */
@media (max-width: 1200px) {
    .features-container {
        max-width: 1000px;
        padding: 0 30px;
    }
    
    .feature-section {
        gap: 50px;
        min-height: 550px;
    }
    
    .feature-content h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 1024px) {
    .features-container {
        max-width: 900px;
        padding: 0 25px;
    }
    
    .feature-section {
        grid-template-columns: 1fr;
        gap: 40px;
        min-height: auto;
        margin-bottom: 60px;
    }
    
    .feature-left {
        order: 1;
    }
    
    .feature-right {
        order: 2;
        padding: 0;
        text-align: center;
    }
    
    .features-header h1 {
        font-size: 2.5rem;
    }
    
    .feature-content h2 {
        font-size: 2rem;
        text-align: center;
    }
    
    .feature-content p {
        text-align: center;
        max-width: 600px;
        margin: 0 auto 40px auto;
    }
    
    .feature-image {
        height: auto;
        max-width: 100%;
        max-height: 350px;
        object-fit: contain;
        object-position: top;
    }
}

@media (max-width: 768px) {
    .features-container {
        padding: 0 20px;
    }
    
    .features-header {
        padding: 30px 0;
    }
    
    .features-header h1 {
        font-size: 2rem;
        margin-bottom: 15px;
    }
    
    .features-header p {
        font-size: 1.1rem;
        padding: 0 10px;
    }
    
    .feature-section {
        gap: 30px;
        margin-bottom: 50px;
    }
    
    .feature-content h2 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    
    .feature-content p {
        font-size: 1rem;
        margin-bottom: 30px;
        line-height: 1.6;
    }
    
    .feature-image {
        height: auto;
        max-width: 100%;
        max-height: 280px;
        object-fit: contain;
        object-position: top;
    }
    
    .feature-image-container {
        border-radius: 15px;
        padding: 15px;
    }
    
    .cta-button {
        padding: 12px 30px;
        font-size: 1rem;
        width: 100%;
        max-width: 250px;
    }
    
    .chart-legend {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .demo-chart {
        padding: 20px;
    }
}

@media (max-width: 600px) {
    .features-container {
        padding: 0 15px;
    }
    
    .features-header {
        padding: 25px 0;
    }
    
    .features-header h1 {
        font-size: 1.8rem;
    }
    
    .features-header p {
        font-size: 1rem;
    }
    
    .feature-section {
        gap: 25px;
        margin-bottom: 40px;
    }
    
    .feature-content h2 {
        font-size: 1.6rem;
        margin-bottom: 15px;
    }
    
    .feature-content p {
        font-size: 0.95rem;
        margin-bottom: 25px;
    }
    
    .feature-image {
        height: auto;
        max-width: 100%;
        max-height: 220px;
        object-fit: contain;
        object-position: top;
    }
    
    .cta-button {
        padding: 10px 25px;
        font-size: 0.9rem;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .features-container {
        padding: 0 10px;
    }
    
    .features-header {
        padding: 20px 0;
    }
    
    .features-header h1 {
        font-size: 1.6rem;
        margin-bottom: 10px;
    }
    
    .features-header p {
        font-size: 0.9rem;
        padding: 0 5px;
    }
    
    .feature-section {
        gap: 20px;
        margin-bottom: 30px;
    }
    
    .feature-content h2 {
        font-size: 1.4rem;
        margin-bottom: 12px;
    }
    
    .feature-content p {
        font-size: 0.9rem;
        margin-bottom: 20px;
        line-height: 1.5;
    }
    
    .feature-image {
        height: auto;
        max-width: 100%;
        max-height: 180px;
        object-fit: contain;
        object-position: top;
    }
    
    .feature-image-container {
        border-radius: 10px;
        padding: 10px;
    }
    
    .cta-button {
        padding: 8px 20px;
        font-size: 0.85rem;
        max-width: 180px;
        letter-spacing: 0.5px;
    }
}

@media (max-width: 360px) {
    .features-header h1 {
        font-size: 1.4rem;
    }
    
    .features-header p {
        font-size: 0.85rem;
    }
    
    .feature-content h2 {
        font-size: 1.3rem;
    }
    
    .feature-content p {
        font-size: 0.85rem;
    }
    
    .feature-image {
        height: auto;
        max-width: 100%;
        max-height: 150px;
        object-fit: contain;
        object-position: top;
    }
    
    .cta-button {
        padding: 8px 18px;
        font-size: 0.8rem;
        max-width: 160px;
    }
}

/* Animation Effects */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-section {
    animation: fadeInUp 0.8s ease-out;
}

.feature-left {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.feature-right {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* Interactive Slider Effect */
.before-after-slider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: rgba(255, 255, 255, 0.6);
    transform: translateX(-50%);
}

/* Chart Animation */
.chart-container canvas {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

/* Additional responsive improvements */
@media (max-width: 1024px) {
    .feature-section:nth-child(even) .feature-left {
        order: 1;
    }
    
    .feature-section:nth-child(even) .feature-right {
        order: 2;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .feature-image-container:hover {
        transform: none;
    }
    
    .cta-button:hover {
        transform: none;
    }
    
    .slider-handle:hover {
        transform: translate(-50%, -50%);
    }
}
