/* ===== Global Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes float {

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

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

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(220, 38, 38, 0.4);
    }

    50% {
        box-shadow: 0 0 25px rgba(220, 38, 38, 0.8);
    }
}

@keyframes heartbeat {

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

    14% {
        transform: scale(1.2);
    }

    28% {
        transform: scale(1);
    }

    42% {
        transform: scale(1.2);
    }

    70% {
        transform: scale(1);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }

    to {
        opacity: 1;
        max-height: 400px;
    }
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }

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

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* ===== Animation Utility Classes ===== */
.animate-fade-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.animate-fade-left {
    animation: fadeInLeft 0.8s ease-out forwards;
    opacity: 0;
}

.animate-fade-right {
    animation: fadeInRight 0.8s ease-out forwards;
    opacity: 0;
}

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

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

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

.animate-heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

/* ===== Animation Delays ===== */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

.delay-600 {
    animation-delay: 0.6s;
}

/* ===== Scroll-triggered Animations ===== */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-animate-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-animate-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.scroll-animate-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-animate-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ===== Glassmorphism Navbar ===== */
.glass-nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.glass-nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* ===== Mobile Menu ===== */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}

.mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

/* ===== Nav Link Underline Effect ===== */
.nav-link {
    position: relative;
}

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

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

/* ===== Gradient Text ===== */
.gradient-text {
    background: linear-gradient(135deg, #DC2626, #1E3A8A);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Back to Top Button ===== */
.back-to-top {
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.back-to-top.show {
    opacity: 1;
    pointer-events: auto;
}

/* ===== Service Card Hover ===== */
.service-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-card:hover .service-icon {
    transform: scale(1.15) rotate(5deg);
    background: linear-gradient(135deg, #DC2626, #B91C1C);
    color: white;
}

.service-icon {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.service-card img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Why Card Hover (About page) ===== */
.why-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.why-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.why-card:hover .why-icon {
    transform: scale(1.15);
}

.why-icon {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Contact Card Hover ===== */
.contact-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

/* ===== Form Input Focus ===== */
.form-input:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* ===== Blog Card Hover ===== */
.blog-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.blog-card:hover img {
    transform: scale(1.05);
}

/* ===== Counter Animation (About page) ===== */
.stat-number {
    animation: countUp 0.8s ease-out forwards;
    opacity: 0;
}

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