/* Precision Cards - Default Styles (Exact match with feature-card) */
.precision-card-wrapper {
    margin-bottom: 2rem;
}

.precision-card {
    /* Default background - can be overridden by Custom CSS */
    background: linear-gradient(135deg, #131720 0%, #1a1f2e 50%, #0f1419 100%);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    padding: 2.5rem;
    text-align: center;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 4px 16px rgba(0, 194, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(0) scale(1);
    will-change: transform;
}

.precision-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.8s ease;
}

.precision-card:hover::before {
    left: 100%;
}

.precision-card:hover {
    transform: translateY(-12px) scale(1.02) !important;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.2),
        0 15px 30px rgba(0, 194, 255, 0.2),
        0 8px 16px rgba(255, 29, 235, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(0, 194, 255, 0.3);
    /* Background will be controlled by Elementor hover controls */
}

.precision-card:active {
    transform: translateY(-8px) scale(1.01);
    transition: all 0.1s ease;
}

/* ---------------- ICON ---------------- */
.precision-card-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, #00C2FF, #6A00FF);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 1.5rem;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 25px rgba(0, 194, 255, 0.3),
        0 4px 15px rgba(106, 0, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(0) scale(1);
    will-change: transform;
    box-sizing: border-box;
}

/* آیکون داخل باکس */
.precision-card-icon i,
.precision-card-icon svg,
.precision-card-icon img {
    display: block;
    width: 100%;
    height: 100%;
}

/* Alignment helper classes (در صورت نیاز دستی) */
.precision-card-icon.left {
    justify-content: flex-start;
}
.precision-card-icon.center {
    justify-content: center;
}
.precision-card-icon.right {
    justify-content: flex-end;
}

/* Hover effects */
.precision-card-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%) skewX(-15deg);
    transition: transform 0.8s ease;
}

.precision-card:hover .precision-card-icon {
    transform: translateY(-8px) scale(1) !important;
    box-shadow: 
        0 15px 35px rgba(0, 194, 255, 0.4),
        0 8px 20px rgba(106, 0, 255, 0.3),
        0 4px 12px rgba(255, 29, 235, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #00C2FF, #FF1DEB);
}

.precision-card:hover .precision-card-icon::before {
    transform: translateX(100%) skewX(-15deg);
}

.precision-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

/* ---------------- TITLE & DESC ---------------- */
.precision-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #FFFFFF;
    line-height: 1.4;
}

.precision-card-description {
    color: #94A3B8;
    line-height: 1.6;
    margin: 0;
}

/* Hover Animation Classes - Only when explicitly enabled */
.precision-card.hover-lift:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.2),
        0 15px 30px rgba(0, 194, 255, 0.2),
        0 8px 16px rgba(255, 29, 235, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(0, 194, 255, 0.3);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
}

.precision-card.hover-scale:hover {
    transform: scale(1.05);
}

.precision-card.hover-rotate:hover {
    transform: rotate(2deg) scale(1.02);
}

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 768px) {
    .precision-card {
        padding: 2rem;
        border-radius: 20px;
    }
    
    .precision-card-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1.5rem;
    }
    
    .precision-card-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .precision-card {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .precision-card-icon {
        width: 56px;
        height: 56px;
        margin-bottom: 1rem;
    }
    
    .precision-card-title {
        font-size: 1.125rem;
    }
}

/* ---------------- FLEX ALIGNMENT OVERRIDE (Elementor Controls) ---------------- */
.precision-card-icon {
    /* Elementor responsive control مقدار justify-content رو اینجا override می‌کنه */
}

/* Force center on mobile to beat theme/Elementor overrides */
@media (max-width: 767px) {
	.elementor-widget-precision_card .precision-card-icon,
	.precision-card .precision-card-icon {
		margin-left: auto !important;
		margin-right: auto !important;
	}
}