/* Custom styles for Sappington Insurance Services */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAFAF5;
}
::-webkit-scrollbar-thumb {
    background: #c5dfb9;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #98c688;
}

/* Selection color */
::selection {
    background: #c5dfb9;
    color: #1f4519;
}

/* Animation keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

/* Intersection Observer animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.animate-left {
    transform: translateX(-30px);
}

.animate-on-scroll.animate-right {
    transform: translateX(30px);
}

.animate-on-scroll.animate-scale {
    transform: scale(0.95);
}

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

/* Staggered delays for grid items */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }
.delay-600 { transition-delay: 600ms; }

/* Navbar active state */
.nav-active {
    color: #3d8b32;
}

/* Service card hover image */
.group:hover .group-hover\\:rotate-3 {
    transform: rotate(3deg);
}

/* Geometric pattern overlay */
.pattern-grid {
    background-image: 
        linear-gradient(rgba(61, 139, 50, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(61, 139, 50, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #3d8b32;
    outline-offset: 2px;
}

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

.btn-ripple::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 ease, height 0.6s ease;
}

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

/* Image loading placeholder */
img {
    background-color: #e3efdc;
}

/* Mobile menu transition */
#mobileMenu {
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

/* Print styles */
@media print {
    nav, #contact, footer {
        display: none;
    }
    body {
        color: #000;
        background: #fff;
    }
}
