/* Custom styles to complement Tailwind CSS */

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

/* Custom fade-in animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in.delay-1 {
    animation-delay: 0.3s;
}

.fade-in.delay-2 {
    animation-delay: 0.6s;
}

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

/* Navigation link active state */
.nav-link.active {
    color: #3182CE;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #3182CE;
}

/* Navbar shadow when scrolled */
#navbar.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Custom button hover effects */
.btn-primary {
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(49, 130, 206, 0.3);
}

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

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

/* Contact form styling */
#contact-form input:focus,
#contact-form textarea:focus {
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

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

#mobile-menu.show {
    max-height: 300px;
}

/* Scroll animations for elements */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

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

/* Loading state for form submission */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success and error message styles */
.success-message {
    background-color: #10b981;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 16px;
}

.error-message {
    background-color: #ef4444;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 16px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .fade-in {
        transform: translateY(20px);
    }
    
    #home h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    #home p {
        font-size: 1.1rem;
    }
}

/* Print styles */
@media print {
    .fixed,
    #mobile-menu-btn,
    #mobile-menu {
        display: none !important;
    }
    
    main {
        padding-top: 0 !important;
    }
    
    section {
        page-break-inside: avoid;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .text-gray-600 {
        color: #374151 !important;
    }
    
    .text-gray-400 {
        color: #6b7280 !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
