/* S&H Erectors - Custom Styles */

/* Hero Pattern Background */
.hero-pattern {
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(255,255,255,.03) 10px,
            rgba(255,255,255,.03) 20px
        );
}

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

/* Fade-in animation for cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Custom focus styles for accessibility */
input:focus,
textarea:focus,
select:focus,
button:focus {
    outline: 2px solid #e67e22;
    outline-offset: 2px;
}

/* Smooth transitions for all interactive elements */
a,
button {
    transition: all 0.3s ease;
}

/* Image loading optimization */
img {
    object-fit: cover;
    max-width: 100%;
    height: auto;
}

/* Form input enhancements */
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Custom scrollbar styling (for webkit browsers) */
::-webkit-scrollbar {
    width: 10px;
}

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

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

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

/* Emergency pulse animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Print styles */
@media print {
    nav,
    footer,
    .no-print {
        display: none;
    }
    
    body {
        font-size: 12pt;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
}

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

/* Loading state for images */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

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

/* Enhanced button styles */
button,
.btn {
    cursor: pointer;
    user-select: none;
}

button:disabled,
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Mobile-specific enhancements */
@media (max-width: 768px) {
    /* Larger touch targets for mobile */
    button,
    a {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Better spacing on mobile */
    .mobile-spacing {
        padding: 1rem;
    }
}

/* Tablet optimizations */
@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* High resolution display optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Animation for page load */
@keyframes slideInFromTop {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

nav {
    animation: slideInFromTop 0.5s ease-out;
}

/* Form validation styles */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown),
select:invalid:not(:placeholder-shown) {
    border-color: #c0392b;
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown),
select:valid:not(:placeholder-shown) {
    border-color: #16a34a;
}

/* Loading spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: #e67e22;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* Card shadow enhancement on hover */
.shadow-hover {
    transition: box-shadow 0.3s ease;
}

.shadow-hover:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Emergency styling */
.emergency-badge {
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(192, 57, 43, 0.5);
}

/* Steel texture overlay */
.steel-texture {
    background-image: 
        linear-gradient(
            rgba(0,0,0,0.05) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(0,0,0,0.05) 1px,
            transparent 1px
        );
    background-size: 20px 20px;
}

/* Utility classes */
.container-custom {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Skip to main content link for accessibility */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: #e67e22;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-main:focus {
    top: 0;
}

/* Service card hover effect */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Industry card styling */
.industry-card {
    border-left: 4px solid transparent;
    transition: border-color 0.3s ease;
}

.industry-card:hover {
    border-left-color: #e67e22;
}

/* Emergency button glow */
.emergency-glow {
    box-shadow: 0 0 20px rgba(192, 57, 43, 0.4);
}

.emergency-glow:hover {
    box-shadow: 0 0 30px rgba(192, 57, 43, 0.6);
}

/* Gradient backgrounds */
.gradient-steel {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.gradient-orange {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
}

/* Phone link styling */
a[href^="tel"] {
    text-decoration: none;
}

/* Navbar transparency handling */
#navbar {
    backdrop-filter: blur(10px);
}

#navbar.bg-transparent {
    background-color: transparent;
}

/* Selection color */
::selection {
    background-color: #e67e22;
    color: white;
}

::-moz-selection {
    background-color: #e67e22;
    color: white;
}

