/* Advanced Visual Effects */

/* Parallax Effect */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
}

/* Advanced Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
    100% {
        transform: translateY(0px);
    }
}

@keyframes fadeInStaggered {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

.staggered-fade-in > * {
    opacity: 0;
}

.staggered-fade-in > *:nth-child(1) {
    animation: fadeInStaggered 0.6s ease-out 0.2s forwards;
}

.staggered-fade-in > *:nth-child(2) {
    animation: fadeInStaggered 0.6s ease-out 0.4s forwards;
}

.staggered-fade-in > *:nth-child(3) {
    animation: fadeInStaggered 0.6s ease-out 0.6s forwards;
}

/* Animated cards */
.animated-card {
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.animated-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 0%, rgba(37, 99, 235, 0.03) 100%);
    z-index: -1;
    transition: opacity 0.5s ease;
    opacity: 0;
}

.animated-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.animated-card:hover:before {
    opacity: 1;
}

/* Reveal animations on scroll */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Gradient overlay effects */
.gradient-overlay {
    position: relative;
    z-index: 1;
}

.gradient-overlay:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.7) 0%, rgba(30, 64, 175, 0.7) 100%);
    z-index: -1;
}

/* Text shadow for better readability on image backgrounds */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Animated icons */
.animated-icon {
    transition: transform 0.3s ease, color 0.3s ease;
}

.animated-icon:hover {
    transform: scale(1.2);
    color: var(--primary-color);
}

/* Glow effect */
.glow-on-hover {
    position: relative;
    overflow: hidden;
}

.glow-on-hover:after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transform: scale(0);
    transition: transform 0.6s ease, opacity 0.6s ease;
}

.glow-on-hover:hover:after {
    opacity: 1;
    transform: scale(1);
}

/* Modern card layout */
.modern-card {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background-color: var(--white);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.modern-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Animated buttons with hover effect */
.btn-animated {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-animated:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    transition: width 0.5s ease;
    z-index: -1;
}

.btn-animated:hover:before {
    width: 100%;
}

/* Advanced hover effects for portfolio items */
.portfolio-effect {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.portfolio-effect img {
    transition: transform 0.5s ease;
}

.portfolio-effect:hover img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 0) 100%);
    opacity: 0;
    display: flex;
    align-items: flex-end;
    padding: 20px;
    transition: opacity 0.5s ease;
}

.portfolio-effect:hover .portfolio-overlay {
    opacity: 1;
}

/* Pulsing animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 99, 235, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* Backdrop blur effect for modal windows */
.blur-backdrop {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.8);
}

/* Animated counter */
.counter-animation {
    display: inline-block;
    position: relative;
    font-weight: 700;
    color: var(--primary-color);
}

/* Advanced section separators */
.section-separator {
    position: relative;
    height: 100px;
    overflow: hidden;
}

.section-separator svg {
    position: absolute;
    width: 100%;
    height: 100px;
    bottom: 0;
}

/* Background patterns */
.dotted-pattern {
    background-image: radial-gradient(var(--primary-color) 10%, transparent 10%);
    background-size: 20px 20px;
    background-position: 0 0;
}

/* CTA Section Effects */
.cta-parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    opacity: 0.9;
    z-index: -1;
}

.parallax-section {
    position: relative;
    overflow: hidden;
    padding: 80px 0;
    color: var(--white);
}

.parallax-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/pattern-dots.svg');
    background-size: 30px 30px;
    opacity: 0.1;
    z-index: -1;
}

/* Ripple Effect for Buttons */
.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.ripple-effect:hover::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    20% {
        transform: scale(25, 25);
        opacity: 0.5;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

/* Social Icons Effects */
.social-icon-effect {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    margin: 0 10px 10px 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.social-icon-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    opacity: 0;
    z-index: -1;
    transition: all 0.3s ease;
    transform: scale(0);
    border-radius: 50%;
}

.social-icon-effect:hover {
    transform: translateY(-5px);
    color: var(--white);
}

.social-icon-effect:hover::before {
    opacity: 1;
    transform: scale(1);
}

/* Floating Label Effect for Form Inputs */
.floating-label {
    position: relative;
    margin-bottom: 30px;
}

.floating-label input,
.floating-label textarea {
    width: 100%;
    padding: 15px;
    border: none;
    border-bottom: 2px solid #e2e8f0;
    background-color: transparent;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

.floating-label label {
    position: absolute;
    top: 15px;
    left: 15px;
    color: #94a3b8;
    pointer-events: none;
    transition: all 0.3s ease;
}

.floating-label input:focus,
.floating-label textarea:focus,
.floating-label input:not(:placeholder-shown),
.floating-label textarea:not(:placeholder-shown) {
    border-color: var(--primary-color);
}

.floating-label input:focus ~ label,
.floating-label textarea:focus ~ label,
.floating-label input:not(:placeholder-shown) ~ label,
.floating-label textarea:not(:placeholder-shown) ~ label {
    top: -12px;
    left: 5px;
    font-size: 12px;
    color: var(--primary-color);
    background-color: var(--white);
    padding: 0 8px;
}

.focus-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.floating-label input:focus ~ .focus-border,
.floating-label textarea:focus ~ .focus-border {
    width: 100%;
}

/* Footer Effects */
.footer-wave-container {
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: translateY(-1px);
}

.footer-wave {
    width: 100%;
    height: 120px;
}

.footer-link-hover {
    position: relative;
    display: inline-block;
    padding-left: 20px;
    transition: all 0.3s ease;
}

.footer-link-hover i {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.footer-link-hover:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.footer-link-hover:hover i {
    color: var(--primary-color);
    opacity: 1;
}

.footer-legal-link {
    transition: all 0.3s ease;
    position: relative;
}

.footer-legal-link::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.footer-legal-link:hover::after {
    width: 100%;
}

.social-icon-pulse {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--dark-color);
    color: var(--white);
    margin: 0 8px 8px 0;
    transition: all 0.3s ease;
}

.social-icon-pulse:hover {
    background-color: var(--primary-color);
    transform: scale(1.1);
    animation: socialPulse 1.5s infinite;
}

@keyframes socialPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 99;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.scroll-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
}

/* CTA Phone Number Effect */
.cta-or-call {
    display: inline-flex;
    align-items: center;
    margin-left: 20px;
}

.cta-or-call span {
    opacity: 0.7;
    margin-right: 10px;
}

.cta-phone {
    position: relative;
    color: var(--white);
    font-weight: 500;
    transition: all 0.3s ease;
    padding-left: 5px;
}

.cta-phone:hover {
    color: var(--white);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.cta-phone i {
    margin-right: 5px;
    animation: phoneVibrate 1s infinite;
}

@keyframes phoneVibrate {
    0% { transform: rotate(0deg); }
    10% { transform: rotate(-5deg); }
    20% { transform: rotate(5deg); }
    30% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}

/* Testimonial quote animation */
.testimonial-text::before {
    animation: quoteFloat 3s ease-in-out infinite;
}

.testimonial-text::after {
    animation: quoteFloat 3s ease-in-out infinite 1.5s;
}

@keyframes quoteFloat {
    0% { transform: translateY(0) rotate(0deg); opacity: 0.5; }
    50% { transform: translateY(-5px) rotate(5deg); opacity: 0.7; }
    100% { transform: translateY(0) rotate(0deg); opacity: 0.5; }
}

/* Contact card effect */
.contact-card {
    position: relative;
    background-color: var(--white);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    overflow: hidden;
    z-index: 1;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
    z-index: 2;
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.1);
}

/* Button full width */
.btn-full-width {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.btn-full-width i {
    transition: transform 0.3s ease;
}

.btn-full-width:hover i {
    transform: translateX(5px);
}

/* Newsletter form styling */
.newsletter-form .input-group {
    display: flex;
    position: relative;
}

.newsletter-form input {
    flex: 1;
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px 0 0 4px;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--white);
    outline: none;
    transition: all 0.3s ease;
}

.newsletter-form button {
    border-radius: 0 4px 4px 0;
    padding: 0 20px;
}

.newsletter-form input:focus {
    border-color: rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.1);
}

.newsletter-info {
    margin-top: 10px;
    opacity: 0.6;
}

/* Create a pattern dots SVG for the CTA background */
