/* Services Section */
.services {
    position: relative;
    padding: 8rem 0;
    overflow: hidden;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    --gradient-1: #6366f1;
    --gradient-2: #8b5cf6;
}

/* Animated gradient background */
.services::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, 
        rgba(99, 102, 241, 0.03) 0%, 
        rgba(139, 92, 246, 0.01) 50%, 
        transparent 70%);
    animation: rotate 30s linear infinite;
    z-index: 1;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


.services .container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
    position: relative;
}

.service-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.05),
        inset 0 1px 3px rgba(255, 255, 255, 0.8),
        inset 0 -1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
    border: 1px solid rgba(203, 213, 225, 0.5);
    transform: perspective(1000px) translateZ(0);
    will-change: transform, box-shadow;
    
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, rgba(139, 92, 246, 0.03) 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover {
    transform: perspective(1000px) rotateX(2deg) rotateY(2deg) translateY(-12px) scale(1.02);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.15), 
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        inset 0 2px 8px rgba(0, 0, 0, 0.06),
        inset 0 -2px 8px rgba(0, 0, 0, 0.04),
        inset 0 0 40px rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(255, 255, 255, 0.95);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    color: white;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.2);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 30px -5px rgba(99, 102, 241, 0.3);
    background: linear-gradient(135deg, var(--gradient-2), var(--gradient-1));
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #1e293b;
    position: relative;
    display: inline-block;
}

.service-card h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transition: width 0.3s ease;
}

.service-card:hover h3::after {
    width: 100%;
}

.service-card p {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 0;
    transition: color 0.3s ease;
}

.service-card:hover p {
    color: #475569;
}

/* Staggered animation for service cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: perspective(1000px) translateY(40px) rotateX(10deg);
    }
    to {
        opacity: 1;
        transform: perspective(1000px) translateY(0) rotateX(0);
    }
}

.service-card {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    transform-origin: center bottom;
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }
.service-card:nth-child(5) { animation-delay: 0.5s; }
.service-card:nth-child(6) { animation-delay: 0.6s; }

/* Responsive adjustments */
/* Decorative elements */
.services-grid::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

.services-grid::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

/* Responsive styles */
@media (max-width: 768px) {
    .services {
        padding: 5rem 0;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2.5rem;
    }
    
    .service-card {
        padding: 2rem 1.5rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
}

/* Hover effect for touch devices */
@media (hover: none) {
    .service-card:active {
        transform: perspective(1000px) rotateX(2deg) rotateY(2deg) translateY(-8px) scale(1.02);
    }
}

/* Enhanced Testimonials Section */
.testimonials {
    position: relative;
    padding: 8rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f0f4f8 100%);
    overflow: hidden;
}

.testimonials::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
}

.testimonials .section-title {
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.testimonials .section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 3px;
}

.testimonials .section-subtitle {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 5rem;
    color: #64748b;
    font-size: 1.1rem;
    line-height: 1.7;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(203, 213, 225, 0.5);
    transform-style: preserve-3d;
    perspective: 1000px;
    will-change: transform, box-shadow;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, rgba(139, 92, 246, 0.03) 100%);
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
}

.testimonial-card:hover::before {
    opacity: 1;
}

.stars {
    color: #fbbf24;
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.testimonial-content {
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.testimonial-content p {
    color: #334155;
    font-size: 1.05rem;
    line-height: 1.8;
    font-style: italic;
    position: relative;
    padding-left: 1.5rem;
    border-left: 3px solid #e2e8f0;
    transition: all 0.3s ease;
}

.testimonial-card:hover .testimonial-content p {
    border-left-color: #6366f1;
    padding-left: 1.8rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
}

.author-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    margin-right: 1rem;
    border: 3px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.testimonial-card:hover .author-image {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.author-info h4 {
    margin: 0;
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
}

.author-info p {
    margin: 0.2rem 0 0;
    color: #64748b;
    font-size: 0.9rem;
}

/* Decorative elements */
.testimonial-card::after {
    content: '"\201D';
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 5rem;
    color: rgba(99, 102, 241, 0.1);
    font-family: Georgia, serif;
    line-height: 1;
    z-index: 0;
    transition: all 0.3s ease;
}

.testimonial-card:hover::after {
    color: rgba(99, 102, 241, 0.15);
    transform: scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .testimonials {
        padding: 5rem 0;
    }
    
    .testimonials .section-subtitle {
        margin-bottom: 3rem;
        padding: 0 1rem;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
        padding: 0 1.5rem;
        gap: 1.5rem;
    }
    
    .testimonial-card {
        padding: 2rem 1.5rem;
    }
    
    .testimonial-card::after {
        font-size: 4rem;
        top: 1rem;
        right: 1.5rem;
    }
}

/* Enhanced Contact Section */
.contact {
    position: relative;
    padding: 8rem 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #fff;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), transparent);
}

.contact .section-title {
    color: #fff;
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.contact .section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 3px;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 4rem auto 0;
    position: relative;
    z-index: 2;
    padding: 0 2rem;
}

/* Contact Info Styles */
.contact-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-content: start;
}

.contact-method {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.contact-method:hover {
    transform: translateY(-5px);
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.2);
}

.contact-icon {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.contact-method:hover .contact-icon {
    transform: rotate(5deg) scale(1.1);
}

.contact-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.contact-details h3 {
    margin: 0 0 0.5rem 0;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-details a, 
.contact-details p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    line-height: 1.6;
}

.contact-details a:hover {
    color: #6366f1;
    transform: translateX(3px);
}

/* Contact Form Styles */
.contact-form-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.contact-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-form-container:hover::before {
    opacity: 1;
}

.form-title {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.form-subtitle {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-form {
    display: grid;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group .required {
    color: #ef4444;
    margin-left: 2px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #6366f1;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.submit-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

.submit-btn:hover::before {
    opacity: 1;
}

/* Animated Background Elements */
.contact-shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    backdrop-filter: blur(5px);
    z-index: 1;
    pointer-events: none;
}

.contact-shape-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 5%;
    animation: float 25s ease-in-out infinite;
}

.contact-shape-2 {
    width: 150px;
    height: 150px;
    bottom: 10%;
    right: 5%;
    animation: float 30s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* Error Message Styling */
.error-message {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
}

/* Success Message */
.form-success {
    display: none;
    text-align: center;
    padding: 2rem;
}

.form-success.visible {
    display: block;
}

.form-success svg {
    width: 60px;
    height: 60px;
    margin-bottom: 1.5rem;
    color: #10b981;
}

.form-success h3 {
    color: #fff;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.form-success p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .contact-content {
        grid-template-columns: 1fr;
        max-width: 600px;
    }
    
    .contact-info {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .contact {
        padding: 5rem 0;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .contact-form-container {
        padding: 2rem 1.5rem;
    }
    
    .contact-shape-1,
    .contact-shape-2 {
        display: none;
    }
}

/* Portfolio Link Styles */
.portfolio-link {
    display: inline-block;
    margin-top: 1.5rem;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    padding: 0.6rem 1.8rem 0.6rem 1.5rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.portfolio-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    border-radius: 50px;
}

.portfolio-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    color: white;
}

.portfolio-link:hover::before {
    opacity: 1;
}

.portfolio-link::after {
    content: '→';
    margin-left: 8px;
    display: inline-block;
    transition: transform 0.3s ease;
    position: relative;
    top: 1px;
}

.portfolio-link:hover::after {
    transform: translateX(4px);
}
