@import url("./variables.css");

.features {
    padding: 8rem 0;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(16, 185, 129, 0.05) 0%, transparent 50%),
        linear-gradient(180deg, #f0fdf4 0%, #ffffff 50%, #ecfdf5 100%);
    position: relative;
    overflow: hidden;
}

/* Organic background pattern */
.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(16, 185, 129, 0.02) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, rgba(5, 150, 105, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.6;
    pointer-events: none;
}

/* Floating organic blob */
.features::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.03) 50%, transparent 70%);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: morphSlow 25s ease-in-out infinite;
    filter: blur(60px);
    pointer-events: none;
}

@keyframes morphSlow {

    0%,
    100% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
        transform: rotate(0deg);
    }

    50% {
        border-radius: 70% 30% 50% 50% / 30% 54% 46% 70%;
        transform: rotate(180deg);
    }
}

.feature-description {
    text-align: center;
    margin: 0 auto 6rem;
    max-width: 800px;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.feature-description .section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #065f46;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.feature-description .section-title strong {
    background: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5rem;
    font-weight: 800;
}

.feature-description .section-sub-title {
    font-size: 1.15rem;
    font-weight: 500;
    color: #064e3b;
    line-height: 1.7;
}

.feature-description .section-sub-title strong {
    color: #059669;
    font-weight: 700;
    font-size: 1.15rem;
}

/* Modern Card Layout */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin: 0 auto;
    max-width: 1300px;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.cards .card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    box-shadow:
        0 4px 20px rgba(16, 185, 129, 0.08),
        0 2px 8px rgba(5, 150, 105, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border: 2px solid rgba(16, 185, 129, 0.1);
    position: relative;
    overflow: hidden;
}

/* Organic gradient accent line */
.cards .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
            #10b981 0%,
            #34d399 50%,
            #6ee7b7 100%);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.cards .card:hover::before {
    opacity: 1;
}

/* DNA-like connection dots in corner */
.cards .card::after {
    content: '';
    position: absolute;
    bottom: 15px;
    right: 20px;
    width: 50px;
    height: 50px;
    background:
        radial-gradient(circle at 30% 50%, rgba(16, 185, 129, 0.15) 3px, transparent 3px),
        radial-gradient(circle at 70% 50%, rgba(52, 211, 153, 0.15) 3px, transparent 3px);
    background-size: 20px 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.cards .card:hover::after {
    opacity: 1;
}

@keyframes shimmer {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

.cards .card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 12px 40px rgba(16, 185, 129, 0.15),
        0 6px 16px rgba(5, 150, 105, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(255, 255, 255, 0.95);
}

/* Icon container with organic glow */
.card-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.card-title svg {
    width: 40px;
    height: 40px;
    padding: 10px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(52, 211, 153, 0.05));
    border-radius: 14px;
    color: #059669;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.cards .card:hover .card-title svg {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(52, 211, 153, 0.1));
    box-shadow:
        0 8px 20px rgba(16, 185, 129, 0.2),
        0 0 30px rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.4);
}

.card-title h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #065f46;
    letter-spacing: -0.01em;
}

/* Description */
.card-description {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    color: #064e3b;
    line-height: 1.8;
    opacity: 0.9;
}

.card-description strong {
    color: #059669;
    font-weight: 700;
}

/* Subtle animation on card appearance */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cards .card {
    animation: fadeInUp 0.6s ease-out backwards;
}

.cards .card:nth-child(1) {
    animation-delay: 0.1s;
}

.cards .card:nth-child(2) {
    animation-delay: 0.2s;
}

.cards .card:nth-child(3) {
    animation-delay: 0.3s;
}

.cards .card:nth-child(4) {
    animation-delay: 0.4s;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .features {
        padding: 6rem 0;
    }

    .feature-description {
        margin-bottom: 4rem;
    }

    .feature-description .section-title,
    .feature-description .section-title strong {
        font-size: 2rem;
    }

    .cards {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .features {
        padding: 4rem 0;
    }

    .feature-description {
        margin-bottom: 3rem;
    }

    .feature-description .section-title,
    .feature-description .section-title strong {
        font-size: 1.75rem;
    }

    .feature-description .section-sub-title,
    .feature-description .section-sub-title strong {
        font-size: 1rem;
    }

    .cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1.5rem;
    }

    .cards .card {
        padding: 2rem 1.5rem;
    }

    .card-title svg {
        width: 36px;
        height: 36px;
    }

    .card-title h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .cards {
        padding: 0 1rem;
    }

    .cards .card {
        padding: 1.75rem 1.25rem;
    }
}