/**
 * Features Section with Hover Effects
 * Grid layout with gradient hover effects
 */

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    position: relative;
    z-index: 10;
    padding: 1rem 0;
    max-width: 1400px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.feature-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0;
    position: relative;
    border-right: 1px solid rgba(229, 231, 235, 0.5);
    transition: all 0.3s ease;
}

/* Border styling for specific positions */
.feature-card:nth-child(1),
.feature-card:nth-child(5) {
    border-left: 1px solid rgba(229, 231, 235, 0.5);
}

@media (min-width: 1024px) {
    .feature-card:nth-child(-n+4) {
        border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    }
}

/* Gradient overlay effects */
.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    height: 100%;
    width: 100%;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

/* Top gradient for first row */
.feature-card:nth-child(-n+4)::before {
    background: linear-gradient(to top, rgba(255, 107, 61, 0.05) 0%, transparent 100%);
}

/* Bottom gradient for second row */
.feature-card:nth-child(n+5)::before {
    background: linear-gradient(to bottom, rgba(255, 107, 61, 0.05) 0%, transparent 100%);
}

.feature-card:hover::before {
    opacity: 1;
}

/* Icon container */
.feature-icon {
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 10;
    padding: 0 1.5rem;
    color: #FF6B3D;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

/* Title container */
.feature-title-container {
    position: relative;
    z-index: 10;
    padding: 0 1.5rem;
    margin-bottom: 0.375rem;
}

.feature-title-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    height: 1.125rem;
    width: 0.25rem;
    border-radius: 0 0.25rem 0.25rem 0;
    background: #d1d5db;
    transition: all 0.2s ease;
    transform-origin: center;
}

.feature-card:hover .feature-title-bar {
    height: 1.5rem;
    background: #FF6B3D;
}

.feature-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1f2937;
    display: inline-block;
    transition: transform 0.2s ease;
}

.feature-card:hover .feature-title {
    transform: translateX(0.5rem);
}

/* Description */
.feature-description {
    font-size: 0.8125rem;
    color: #4b5563;
    max-width: 18rem;
    position: relative;
    z-index: 10;
    padding: 0 1.5rem;
    line-height: 1.5;
}

/* Mobile responsive */
@media (max-width: 767px) {
    .feature-card {
        border-right: none;
        border-left: none;
        border-bottom: 1px solid rgba(229, 231, 235, 0.5);
        padding: 1.25rem 0;
    }

    .feature-card:last-child {
        border-bottom: none;
    }

    .feature-card:nth-child(1),
    .feature-card:nth-child(5) {
        border-left: none;
    }

    .feature-icon,
    .feature-title-container,
    .feature-description {
        padding: 0 1rem;
    }
}

/* Tablet responsive */
@media (min-width: 768px) and (max-width: 1023px) {
    .feature-card:nth-child(odd) {
        border-left: 1px solid rgba(229, 231, 235, 0.5);
    }

    .feature-card:nth-child(even) {
        border-right: none;
    }

    .feature-card:nth-child(-n+6) {
        border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    }

    .feature-card:nth-child(7),
    .feature-card:nth-child(8) {
        border-bottom: none;
    }
}

/* Animation on scroll (optional) */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-card.animate {
    animation: fadeInUp 0.6s ease forwards;
}

.feature-card.animate:nth-child(1) { animation-delay: 0.1s; }
.feature-card.animate:nth-child(2) { animation-delay: 0.2s; }
.feature-card.animate:nth-child(3) { animation-delay: 0.3s; }
.feature-card.animate:nth-child(4) { animation-delay: 0.4s; }
.feature-card.animate:nth-child(5) { animation-delay: 0.5s; }
.feature-card.animate:nth-child(6) { animation-delay: 0.6s; }
.feature-card.animate:nth-child(7) { animation-delay: 0.7s; }
.feature-card.animate:nth-child(8) { animation-delay: 0.8s; }
