/* Dr Meddy AI Ecosystem Section - Based on main.css */

@keyframes iconSpinPop {
    0% {
        transform: rotateY(0deg) scale(1);
    }

    50% {
        transform: rotateY(540deg) scale(1.3);
    }

    100% {
        transform: rotateY(720deg) scale(1);
    }
}

.ecosystem-section {
    padding: 6rem 0;
    background: var(--bg-light);
    position: relative;
}

.ecosystem-header {
    text-align: center;
    margin-bottom: 3rem;
}

.ecosystem-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.ecosystem-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Grid Layout - 4 Cards */
.ecosystem-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* Individual Card */
.ecosystem-card {
    background: rgba(255, 255, 255, 0.98);
    padding: 2.5rem 2rem;
    border-radius: 24px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(255, 255, 255, 1);
    box-shadow:
        0 10px 30px rgba(14, 65, 91, 0.05),
        0 1px 0 rgba(255, 255, 255, 0.6) inset;
    position: relative;
    overflow: hidden;
}

.ecosystem-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));
    pointer-events: none;
    z-index: 10;
}

.ecosystem-card:hover {
    transform: translateY(-8px);
    background: #ffffff;
    border-color: var(--primary-color) !important;
    box-shadow:
        0 30px 60px rgba(14, 65, 91, 0.12),
        inset 0 0 0 1px rgba(14, 65, 91, 0.05);
}

/* Main Card (Dr Meddy) - Now White to match others */
.ecosystem-card-main {
    background: white !important;
    border-color: rgba(14, 65, 91, 0.08) !important;
}

.ecosystem-card-main .ecosystem-card-title {
    color: var(--text-dark) !important;
}

.ecosystem-card-main .ecosystem-card-description {
    color: var(--text-light) !important;
}

.ecosystem-card-main .ecosystem-card-icon {
    background: rgba(255, 255, 255, 0.9) !important;
    color: var(--primary-color) !important;
    border: 1px solid rgba(255, 255, 255, 1) !important;
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.1),
        inset 0 4px 12px rgba(255, 255, 255, 1),
        inset 0 -4px 12px rgba(14, 65, 91, 0.05) !important;
    backdrop-filter: blur(5px);
}

/* Card Icon - Premium 3D Liquid Glass Effect */
.ecosystem-card-icon {
    width: 65px;
    height: 65px;
    background: rgba(255, 255, 255, 0.92) !important;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    border: 1px solid rgba(255, 255, 255, 1) !important;
    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.08),
        inset 0 4px 12px rgba(255, 255, 255, 1),
        inset 0 -4px 12px rgba(14, 65, 91, 0.05) !important;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(6px);
}

/* Liquid Shine Overlay */
.ecosystem-card-icon::before {
    content: '' !important;
    position: absolute !important;
    top: -5% !important;
    left: -5% !important;
    right: -5% !important;
    height: 55% !important;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 1) 0%,
            rgba(255, 255, 255, 0.5) 40%,
            rgba(255, 255, 255, 0) 100%) !important;
    border-radius: 18px 18px 60% 60% !important;
    pointer-events: none !important;
    z-index: 2;
    transform: rotate(-5deg);
}

/* Glass Inner Glow */
.ecosystem-card-icon::after {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background: radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 1), transparent 80%) !important;
    pointer-events: none !important;
    z-index: 1;
    opacity: 0.6;
}

.ecosystem-card:hover .ecosystem-card-icon {
    background: var(--primary-color) !important;
    transform: scale(1.08) !important;
    box-shadow:
        0 15px 30px rgba(14, 65, 91, 0.25),
        inset 0 4px 10px rgba(255, 255, 255, 0.2),
        inset 0 -4px 10px rgba(0, 0, 0, 0.1) !important;
    border-color: var(--primary-color) !important;
}

.ecosystem-card-icon svg,
.ecosystem-card-icon i {
    color: var(--primary-color) !important;
    position: relative;
    z-index: 3;
    font-size: 1.6rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

.ecosystem-card:hover .ecosystem-card-icon svg,
.ecosystem-card:hover .ecosystem-card-icon i {
    color: white !important;
    transform: scale(1.1);
}

/* Card Title */
.ecosystem-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

/* Card Description */
.ecosystem-card-description {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

/* Result Text */
.ecosystem-result-simple {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-dark);
    margin: 3rem auto 0;
    max-width: 700px;
    line-height: 1.6;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .ecosystem-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .ecosystem-title {
        font-size: 2.25rem;
    }

    .ecosystem-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 968px) {
    .ecosystem-section {
        padding: 4rem 0;
    }

    .ecosystem-header {
        margin-bottom: 2.5rem;
    }

    .ecosystem-title {
        font-size: 2rem;
    }

    .ecosystem-subtitle {
        font-size: 0.95rem;
    }

    .ecosystem-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .ecosystem-card {
        padding: 1.75rem;
    }
}

@media (max-width: 768px) {
    .ecosystem-section {
        padding: 3.5rem 0;
    }

    .ecosystem-title {
        font-size: 1.85rem;
    }

    .ecosystem-subtitle {
        font-size: 0.9rem;
    }

    .ecosystem-card {
        padding: 1.5rem;
    }

    .ecosystem-card-icon {
        width: 55px;
        height: 55px;
    }

    .ecosystem-card-icon svg {
        width: 28px;
        height: 28px;
    }

    .ecosystem-card-title {
        font-size: 1.05rem;
    }

    .ecosystem-card-description {
        font-size: 0.9rem;
    }

    .ecosystem-result-simple {
        font-size: 1.05rem;
        margin-top: 2.5rem;
    }
}

@media (max-width: 576px) {
    .ecosystem-section {
        padding: 3rem 0;
    }

    .ecosystem-title {
        font-size: 1.65rem;
    }

    .ecosystem-subtitle {
        font-size: 0.85rem;
    }

    .ecosystem-header {
        margin-bottom: 2rem;
    }

    .ecosystem-grid {
        gap: 1.25rem;
        margin-bottom: 2rem;
    }

    .ecosystem-card {
        padding: 1.25rem;
    }

    .ecosystem-card-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 1.25rem;
    }

    .ecosystem-card-icon svg {
        width: 24px;
        height: 24px;
    }

    .ecosystem-card-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .ecosystem-card-description {
        font-size: 0.85rem;
    }

    .ecosystem-result-simple {
        font-size: 0.95rem;
        margin-top: 2rem;
    }
}