/* Custom Animations and Styles */

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

/* Fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
    opacity: 0;
}

.fade-in-up {
    animation: fadeIn 1s ease-out forwards;
    opacity: 0;
}

/* Scroll-triggered animations */
.fade-in-up.visible {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Navigation link active state */
.nav-link {
    position: relative;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #e63946;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Button hover effects */
.btn-primary {
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

/* Form focus effects */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

/* Project card image zoom effect */
.project-card img {
    transition: transform 0.5s ease;
}

.project-card:hover img {
    transform: scale(1.1);
}

/* WhatsApp float button pulse animation */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 35px rgba(37, 211, 102, 0.5);
    }
}

#whatsapp-float {
    animation: pulse 2s infinite;
}

/* Hero video overlay gradient */
.hero-overlay {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.7) 0%, rgba(230, 57, 70, 0.3) 100%);
}

/* Service card hover effect */
.service-card {
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
}

/* Mobile menu transition */
#mobile-menu {
    transition: all 0.3s ease-in-out;
}

#mobile-menu.show {
    display: block;
}

/* Loading state */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Form success message */
.success-message {
    background-color: #10b981;
    color: white;
    padding: 1rem;
    border-radius: 0.125rem;
    margin-top: 1rem;
    display: none;
}

.success-message.show {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

/* Responsive video container */
.video-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

.video-container video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #1a1a1a;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e63946;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none;
    }
}

/* ============================================ */
/* DYNAMIC ANIMATIONS */
/* ============================================ */

/* Blob animation for hero background */
@keyframes blob {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(20px, -50px) scale(1.1);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    75% {
        transform: translate(50px, 50px) scale(1.05);
    }
}

.animate-blob {
    animation: blob 20s infinite ease-in-out;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Hero title glow effect */
.hero-title {
    text-shadow: 0 0 30px rgba(230, 57, 70, 0.3),
        0 0 60px rgba(230, 57, 70, 0.2);
}

/* Smooth card transformations */
.project-card,
.service-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.project-card:hover,
.service-card:hover {
    transform: translateY(-12px) scale(1.02);
}

/* Navbar glass effect on scroll */
nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Parallax effect for sections */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

/* Stagger fade-in for lists */
.fade-in-stagger>* {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

.fade-in-stagger>*:nth-child(1) {
    animation-delay: 0.1s;
}

.fade-in-stagger>*:nth-child(2) {
    animation-delay: 0.2s;
}

.fade-in-stagger>*:nth-child(3) {
    animation-delay: 0.3s;
}

.fade-in-stagger>*:nth-child(4) {
    animation-delay: 0.4s;
}

.fade-in-stagger>*:nth-child(5) {
    animation-delay: 0.5s;
}

/* Shine effect for buttons */
@keyframes shine {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    transition: left 0.7s;
}

.btn-primary:hover::after {
    left: 100%;
}

/* Smooth underline for links */
a {
    position: relative;
    text-decoration: none;
}

/* Enhanced image zoom on hover */
.project-card .relative {
    overflow: hidden;
}

.project-card img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card:hover img {
    transform: scale(1.15) rotate(2deg);
}

/* Pulse effect for important elements */
@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(230, 57, 70, 0.4);
    }

    50% {
        box-shadow: 0 0 40px rgba(230, 57, 70, 0.8);
    }
}

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

/* Gradient text animation */
@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.gradient-text {
    background: linear-gradient(90deg,
            #e63946,
            #ff6b6b,
            #e63946);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
}

/* Ripple effect on click */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

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

.ripple::before {
    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;
}

.ripple:active::before {
    width: 300px;
    height: 300px;
}