/**
 * KTDigital Academy Pro Widgets - Feature Card
 */

.ktda-feature-card {
    position: relative;
    display: flex;
    flex-direction: row;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* Variables map background color for perfect gradient blending */
    --ktda-bg-color: #142B56; 
    background-color: var(--ktda-bg-color);
    box-shadow: 0 12px 40px rgba(20, 43, 86, 0.08);
}

.ktda-feature-card--secondary {
    --ktda-bg-color: #ffffff;
    border: 1px solid rgba(20, 43, 86, 0.06);
    box-shadow: 0 12px 32px rgba(20, 43, 86, 0.04), 0 4px 12px rgba(20, 43, 86, 0.02);
}

.ktda-feature-card__content {
    flex: 1 1 auto;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.ktda-feature-card__image-wrapper {
    flex: 0 0 35%;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.ktda-feature-card--img-left {
    flex-direction: row-reverse;
}

.ktda-feature-card__image {
    position: absolute;
    top: 0; 
    right: 0; 
    bottom: 0; 
    left: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.ktda-feature-card__overlay {
    position: absolute;
    top: 0; 
    right: 0; 
    bottom: 0; 
    left: 0;
    z-index: 2;
    transition: opacity 0.3s ease;
}

/* Gradients that perfectly blend the image into the background */
.ktda-feature-card--img-right .ktda-feature-card__overlay {
    background: linear-gradient(to right, var(--ktda-bg-color) 0%, var(--ktda-bg-color) 15%, transparent 100%);
}

.ktda-feature-card--img-left .ktda-feature-card__overlay {
    background: linear-gradient(to left, var(--ktda-bg-color) 0%, var(--ktda-bg-color) 15%, transparent 100%);
}

/* Icon Container */
.ktda-feature-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 20px;
    transition: transform 0.4s ease;
}

.ktda-feature-card--primary .ktda-feature-card__icon {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.ktda-feature-card--secondary .ktda-feature-card__icon {
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(20, 43, 86, 0.06);
    color: #142B56;
    border: 1px solid rgba(20, 43, 86, 0.04);
}

.ktda-feature-card__icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Typography */
.ktda-feature-card__title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: #ffffff;
}

.ktda-feature-card--secondary .ktda-feature-card__title {
    color: #142B56;
}

.ktda-feature-card__desc {
    font-size: 15px;
    line-height: 1.65;
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
}

.ktda-feature-card--secondary .ktda-feature-card__desc {
    color: #475569;
}

/* CTA */
.ktda-feature-card__cta-wrapper {
    margin-top: 24px;
}

.ktda-feature-card__cta {
    display: inline-flex;
    align-items: center;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
    gap: 8px;
}

.ktda-feature-card--secondary .ktda-feature-card__cta {
    color: #142B56;
}

.ktda-feature-card__cta-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.ktda-feature-card__cta:hover .ktda-feature-card__cta-icon {
    transform: translateX(4px);
}

/* Hover Effects */
.ktda-feature-card:hover {
    transform: translateY(-6px);
}

.ktda-feature-card--primary:hover {
    box-shadow: 0 16px 48px rgba(20, 43, 86, 0.15);
}

.ktda-feature-card--secondary:hover {
    box-shadow: 0 16px 40px rgba(20, 43, 86, 0.08), 0 6px 16px rgba(20, 43, 86, 0.03);
}

.ktda-feature-card:hover .ktda-feature-card__image {
    transform: scale(1.06);
}

.ktda-feature-card:hover .ktda-feature-card__icon {
    transform: scale(1.05);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .ktda-feature-card__content {
        padding: 32px;
    }
}

@media (max-width: 767px) {
    .ktda-feature-card {
        flex-direction: column !important;
    }
    
    .ktda-feature-card__image-wrapper {
        order: -1; /* Always push image to the top on mobile */
        width: 100% !important;
        height: 200px;
        flex: none;
    }
    
    .ktda-feature-card__content {
        order: 2;
        padding: 32px;
    }
    
    .ktda-feature-card__overlay {
        /* Gradient changes direction to blend bottom to top on mobile */
        background: linear-gradient(to bottom, transparent 0%, var(--ktda-bg-color) 100%) !important;
    }
    
    .ktda-feature-card__title {
        font-size: 20px;
    }
}
