/* Custom styles for Americas Metal Structures */

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

/* Navbar scroll effect */
nav.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 20px rgba(5, 150, 105, 0.1);
}

nav.scrolled .menu-line {
    background: #064e3b;
}

/* Mobile menu animation */
.menu-line {
    transition: all 0.3s ease;
}

#mobileMenu.open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#mobileMenu.open .menu-line:nth-child(2) {
    opacity: 0;
}

#mobileMenu.open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 24px;
    margin-left: 0;
    margin-right: 0;
}

/* Mobile link hover */
.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(5, 150, 105, 0.1);
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-link:hover {
    color: #059669;
    padding-left: 0.5rem;
}

/* Service card hover effects */
.service-card {
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Geometric shape animations */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(45deg); }
    50% { transform: translateY(-20px) rotate(45deg); }
}

@keyframes floatReverse {
    0%, 100% { transform: translateY(0) rotate(12deg); }
    50% { transform: translateY(15px) rotate(12deg); }
}

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

.hero-shape-2 {
    animation: floatReverse 8s ease-in-out infinite;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .hero-shape-1,
    .hero-shape-2 {
        animation: none;
    }
    
    .service-card:hover {
        transform: none;
    }
    
    .group:hover .group-hover\:scale-110 {
        transform: none;
    }
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
    border-radius: 4px;
}

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

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

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

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

/* Loading state for form */
button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Image lazy load fade-in (progressive enhancement) */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}
