/* Modern CSS Animations and Custom Styles */

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

/* Custom scroll bar */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #1e40af;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1d4ed8;
}

/* Custom animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0, -30px, 0);
    }
    70% {
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

@keyframes float {
    0% {
        box-shadow: 0 5px 15px 0px rgba(0,0,0,0.6);
        transform: translatey(0px);
    }
    50% {
        box-shadow: 0 25px 15px 0px rgba(0,0,0,0.2);
        transform: translatey(-20px);
    }
    100% {
        box-shadow: 0 5px 15px 0px rgba(0,0,0,0.6);
        transform: translatey(0px);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 5px #1e40af;
    }
    50% {
        box-shadow: 0 0 20px #1e40af, 0 0 30px #1e40af;
    }
    100% {
        box-shadow: 0 0 5px #1e40af;
    }
}

/* Navigation styles */
.nav-link {
    @apply relative text-gray-700 hover:text-blue-600 transition-all duration-300 font-medium;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #1e40af, #f97316);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* Button hover effects */
.btn-primary {
    @apply bg-gradient-to-r from-blue-600 to-blue-700 text-white px-6 py-3 rounded-full font-semibold transition-all duration-300;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.4);
}

.btn-secondary {
    @apply bg-gradient-to-r from-orange-500 to-orange-600 text-white px-6 py-3 rounded-full font-semibold transition-all duration-300;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.4);
}

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

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

.service-card:hover .service-icon {
    transform: scale(1.1);
    animation: glow 2s infinite;
}

.price-card {
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--tw-gradient-from), var(--tw-gradient-to));
}

.price-card:hover {
    transform: scale(1.05);
    animation: float 3s ease-in-out infinite;
}

/* Loading animation */
.loading {
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}

/* Parallax effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Text gradient effects */
.text-gradient {
    background: linear-gradient(45deg, #1e40af, #f97316, #ef4444);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient 3s ease infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Floating elements */
.float {
    animation: float 6s ease-in-out infinite;
}

.float:nth-child(2) {
    animation-delay: 2s;
}

.float:nth-child(3) {
    animation-delay: 4s;
}

/* Progress bar animation */
.progress-bar {
    width: 0%;
    transition: width 2s ease-in-out;
}

.progress-bar.animate {
    width: 100%;
}

/* Typewriter effect */
.typewriter {
    overflow: hidden;
    border-right: .15em solid #f97316;
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: .15em;
    animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #f97316; }
}

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s ease;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Custom background patterns */
.pattern-dots {
    background-image: radial-gradient(circle, #e5e7eb 1px, transparent 1px);
    background-size: 20px 20px;
}

.pattern-grid {
    background-image:
        linear-gradient(rgba(30, 64, 175, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 64, 175, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Contact form styles */
.form-input {
    @apply w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-300;
}

.form-input:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.1);
}

/* Emergency button pulse */
.emergency-pulse {
    animation: pulse 2s infinite;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(239, 68, 68, 0.8);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .hero-text {
        font-size: 2rem;
        line-height: 1.2;
    }

    .service-card {
        margin-bottom: 1rem;
    }

    .mobile-padding {
        padding: 1rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .auto-dark {
        background-color: #1f2937;
        color: #f9fafb;
    }
}

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

    .print-only {
        display: block;
    }
}