/* Cursor color change based on section */
.cursor-services::before {
    background-color: #c4391d !important;
}

/* Services Sliding Page Styles */
.services-page-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f0f2 100%);
    z-index: 40;
    transition: right 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
}

.services-page-overlay.active {
    right: 0;
}

.services-close-btn {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: rgba(196, 57, 29, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(196, 57, 29, 0.3);
}

.services-close-btn:hover {
    background: #c4391d;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(196, 57, 29, 0.4);
}

.services-section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.services-page-overlay.active .services-section {
    opacity: 1;
    transform: translateY(0);
}

.services-page-overlay.active .services-section:nth-child(1) { transition-delay: 0.1s; }
.services-page-overlay.active .services-section:nth-child(2) { transition-delay: 0.2s; }
.services-page-overlay.active .services-section:nth-child(3) { transition-delay: 0.3s; }
.services-page-overlay.active .services-section:nth-child(4) { transition-delay: 0.4s; }
.services-page-overlay.active .services-section:nth-child(5) { transition-delay: 0.5s; }

/* Floating animations for cards */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(196, 57, 29, 0.1); }
    50% { box-shadow: 0 0 40px rgba(196, 57, 29, 0.3), 0 0 60px rgba(196, 57, 29, 0.1); }
}

@keyframes icon-bounce {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-5deg); }
    75% { transform: scale(1.05) rotate(5deg); }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Enhanced card animations */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(1) { animation-delay: 0s; }
.floating-card:nth-child(2) { animation-delay: 2s; }
.floating-card:nth-child(3) { animation-delay: 4s; }
.floating-card:nth-child(4) { animation-delay: 1s; }

.pulse-card:hover {
    animation: pulse-glow 2s ease-in-out infinite;
}

.icon-hover:hover {
    animation: icon-bounce 0.6s ease-in-out;
}

/* Animated gradient backgrounds */
.animated-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

/* Parallax elements */
.parallax-float {
    animation: float 8s ease-in-out infinite;
}

/* Enhanced Service Cards - Completely New System */
.enhanced-service-card {
    position: relative;
    height: 520px;
    perspective: 1000px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
    /* backdrop-filter disabled for performance */
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.enhanced-service-card:hover .card-inner {
    transform: translateY(-8px) rotateX(2deg);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Icon Container */
.icon-container {
    position: relative;
    margin-bottom: 2rem;
}

.icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.icon-circle.purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.icon-circle.emerald {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.icon-circle.blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.enhanced-service-card:hover .icon-circle {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.2);
}

.icon-svg {
    width: 40px;
    height: 40px;
    color: white;
    transition: transform 0.4s ease;
}

.enhanced-service-card:hover .icon-svg {
    transform: scale(1.1);
}

/* Gradient Line */
.gradient-line {
    position: absolute;
    bottom: -8px;
    left: 0;
    height: 3px;
    width: 0;
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    transition-delay: 0.2s;
}

.gradient-line.purple {
    background: linear-gradient(90deg, #8b5cf6, #a855f7, transparent);
}

.gradient-line.emerald {
    background: linear-gradient(90deg, #10b981, #34d399, transparent);
}

.gradient-line.blue {
    background: linear-gradient(90deg, #3b82f6, #60a5fa, transparent);
}

.enhanced-service-card:hover .gradient-line {
    width: 100%;
}

/* Content Section */
.content-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: #1f2937;
    margin-bottom: 1rem;
    transition: color 0.4s ease;
}

.enhanced-service-card.group:hover .card-title {
    color: #111827;
}

.card-description {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    transition: color 0.4s ease;
}

.enhanced-service-card:hover .card-description {
    color: #4b5563;
}

/* Features List */
.features-list {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    transition-delay: 0.1s;
}

.enhanced-service-card:hover .features-list {
    opacity: 1;
    transform: translateY(0);
}

.feature-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 0.875rem;
    font-size: 0.925rem;
    font-weight: 600;
    color: #1f2937;
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateX(4px);
}

.feature-icon {
    width: 16px;
    height: 16px;
    margin-right: 0.75rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.feature-icon.purple {
    color: #8b5cf6;
}

.feature-icon.emerald {
    color: #10b981;
}

.feature-icon.blue {
    color: #3b82f6;
}

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

/* Hover Overlay */
.hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.hover-overlay.purple {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(168, 85, 247, 0.02) 100%);
}

.hover-overlay.emerald {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(52, 211, 153, 0.02) 100%);
}

.hover-overlay.blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(96, 165, 250, 0.02) 100%);
}

.enhanced-service-card:hover .hover-overlay {
    opacity: 1;
}

/* Staggered Animation */
.enhanced-service-card:nth-child(1) {
    animation-delay: 0s;
}

.enhanced-service-card:nth-child(2) {
    animation-delay: 0.1s;
}

.enhanced-service-card:nth-child(3) {
    animation-delay: 0.2s;
}

/* Service content styles */
.service-content {
    position: relative;
}

/* Services responsive styles */
@media (max-width: 768px) {
    .services-close-btn {
        top: 1rem;
        right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .enhanced-service-card {
        height: auto;
        min-height: 480px;
    }
    
    .card-inner {
        padding: 1.5rem;
    }
    
    .icon-circle {
        width: 70px;
        height: 70px;
    }
    
    .icon-svg {
        width: 35px;
        height: 35px;
    }
}