/* Custom styles for Tri State Fence & Iron Works */

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

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

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

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

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

/* Animation keyframes */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

.hero-shape-3 {
    animation: float 4s ease-in-out infinite reverse;
}

/* Service card image hover */
.service-card img {
    transition: transform 0.5s ease;
}

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

/* Button ripple effect */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:active::after {
    width: 300px;
    height: 300px;
}

/* Mobile menu overlay */
.mobile-menu {
    backdrop-filter: blur(10px);
}

/* Image lazy loading placeholder */
img {
    background: linear-gradient(90deg, #F4E4D4 25%, #E4D4C4 50%, #F4E4D4 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

img[src] {
    animation: none;
    background: none;
}

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

/* Print styles */
@media print {
    .hero-shape-1,
    .hero-shape-2,
    .hero-shape-3,
    .mobile-menu {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

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

/* High contrast mode */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid currentColor;
    }
    
    .service-card {
        border: 2px solid #2C2C2C;
    }
}

/* Landscape mode on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-shape-1 {
        height: 50%;
    }
    
    .hero-shape-2 {
        display: none;
    }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
    .service-card {
        padding: 2rem;
    }
    
    .service-card img {
        height: 16rem;
    }
}

/* Large screens */
@media (min-width: 1280px) {
    .hero-shape-1 {
        width: 55%;
    }
    
    .hero-shape-2 {
        width: 25%;
    }
}
