/* ========================================
   ADVANCED MICRO-INTERACTIONS & ENHANCEMENTS
   ======================================== */

/* Smooth Page Transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Enhanced Card Hover Effects */
.service-box,
.benefit-con .beneft-box,
.team-con .team-box,
.pricing-con .pricing-box,
.contactinfo-con .contact-box {
    position: relative;
    overflow: hidden;
}

.service-box::before,
.benefit-con .beneft-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.service-box:hover::before,
.benefit-con .beneft-box:hover::before {
    opacity: 1;
}

/* Icon Pulse Animation */
@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.service-box:hover .icon img,
.benefit-con .beneft-box:hover .icon img {
    animation: iconPulse 1.5s ease-in-out infinite;
}

/* Text Gradient Effects */
.banner-con .banner_content h1,
.about-con .about_content h2,
.service-con .service_content h2 {
    position: relative;
    display: inline-block;
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Link Hover Effects */
a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Form Input Enhancements */
.contact-con .contact_form input:focus,
.contact-con .contact_form select:focus,
.contact-con .contact_form textarea:focus {
    transform: translateY(-2px);
    outline: none;
}

/* Button Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.all_button {
    position: relative;
    overflow: hidden;
}

.all_button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.all_button:active::after {
    width: 300px;
    height: 300px;
}

/* Navbar Scroll Effect */
.header.scrolled {
    padding: 12px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Image Zoom on Hover */
.about-con .about_wrapper .image,
.faq-con .faq_wrapper .faq-image,
.team-con .team-box figure {
    overflow: hidden;
}

.about-con .about_wrapper .image img,
.faq-con .faq_wrapper .faq-image img,
.team-con .team-box figure img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-con .about_wrapper .image:hover img,
.faq-con .faq_wrapper .faq-image:hover img,
.team-con .team-box:hover figure img {
    transform: scale(1.08);
}

/* Testimonial Card Enhancement */
.testimonial-con .testimonial-box {
    position: relative;
}

.testimonial-con .testimonial-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(139, 92, 246, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.testimonial-con .testimonial-box:hover::after {
    opacity: 1;
}

/* FAQ Accordion Smooth Transitions */
.faq-con .accordion-card .card-body {
    transition: all 0.3s ease;
}

/* Counter Animation Enhancement */
.choose-con .choose_wrapper .value span,
.statistic-con .statistic-box .value {
    display: inline-block;
    transition: transform 0.3s ease;
}

.choose-con .choose_wrapper ul li:hover .value span,
.statistic-con .statistic-box:hover .value {
    transform: scale(1.1);
}

/* Footer Link Hover */
.footer-con .middle_portion .links li a,
.footer-con .middle_portion .contact a {
    position: relative;
    display: inline-block;
}

.footer-con .middle_portion .links li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-cyan);
    transition: width 0.3s ease;
}

.footer-con .middle_portion .links li a:hover::after {
    width: 100%;
}

/* Social Icon Animations */
.footer-con .middle_portion .social-icons li {
    transition: transform 0.3s ease;
}

.footer-con .middle_portion .social-icons li:hover {
    transform: translateY(-4px);
}

/* Loading State for Images */
img {
    transition: opacity 0.3s ease;
}

img:not([src]) {
    opacity: 0;
}

/* Selection Color */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: var(--text-primary);
}

::-moz-selection {
    background: rgba(59, 130, 246, 0.3);
    color: var(--text-primary);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
}

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Preloader Enhancement */
.loader-mask {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-deep));
}

.loader div {
    background: var(--accent-gradient);
}

/* Parallax Effect Enhancement */
.banner-con {
    background-attachment: fixed;
}

@media (max-width: 768px) {
    .banner-con {
        background-attachment: scroll;
    }
}

/* Gradient Text Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.navbar-brand h2 {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

/* Card Stack Effect */
.service-con .row > div {
    transition: transform 0.3s ease;
}

.service-con .row > div:hover {
    z-index: 10;
}

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

.benefit-con .benefit_wrapper ul li .icon {
    animation: float 3s ease-in-out infinite;
}

.benefit-con .benefit_wrapper ul li:nth-child(2) .icon {
    animation-delay: 0.5s;
}

.benefit-con .benefit_wrapper ul li:nth-child(3) .icon {
    animation-delay: 1s;
}

/* Glow Effect on Hover */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(59, 130, 246, 0.6);
    }
}

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

/* Stagger Animation for Lists */
.benefit-con .benefit_wrapper ul li,
.service-con .service-box {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.benefit-con .benefit_wrapper ul li:nth-child(1),
.service-con .row > div:nth-child(1) .service-box {
    animation-delay: 0.1s;
}

.benefit-con .benefit_wrapper ul li:nth-child(2),
.service-con .row > div:nth-child(2) .service-box {
    animation-delay: 0.2s;
}

.benefit-con .benefit_wrapper ul li:nth-child(3),
.service-con .row > div:nth-child(3) .service-box {
    animation-delay: 0.3s;
}

.service-con .row > div:nth-child(4) .service-box {
    animation-delay: 0.4s;
}

.service-con .row > div:nth-child(5) .service-box {
    animation-delay: 0.5s;
}

.service-con .row > div:nth-child(6) .service-box {
    animation-delay: 0.6s;
}

/* Dark Mode Smooth Transition */
[data-theme="dark"] * {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Enhanced Typography */
h1, h2, h3, h4, h5, h6 {
    text-rendering: optimizeLegibility;
}

p {
    text-rendering: optimizeLegibility;
}

/* Print Styles */
@media print {
    .header,
    .footer-con,
    #button,
    .banner-con .banner_content .button_wrapper {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
