/* Custom styles for Herrmann Insurance & Financial Group */

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

/* Navbar scroll state */
#navbar {
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

#navbar.scrolled {
    background: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 20px rgba(44, 77, 33, 0.08);
}

/* Hero animations - above the fold, always visible */
#hero h1 {
    animation: fadeInUp 0.8s ease-out both;
}

#hero p {
    animation: fadeInUp 0.8s ease-out 0.15s both;
}

#hero .flex.flex-col {
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

#hero .mt-16 {
    animation: fadeInUp 0.8s ease-out 0.45s both;
}

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

/* Service cards - progressive enhancement for scroll reveal */
.service-card {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .service-card.reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    
    .service-card.reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Testimonial cards - progressive enhancement */
.testimonial-card {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .testimonial-card.reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    
    .testimonial-card.reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

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

#mobileMenu.hidden {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#mobileMenu:not(.hidden) {
    max-height: 400px;
    opacity: 1;
}

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

.mobile-link:last-child {
    border-bottom: none;
}

.mobile-link:hover {
    color: #4d7d36;
}

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

/* Subtle hover lift on cards */
.service-card:hover,
.testimonial-card:hover {
    transform: translateY(-4px);
}

@media (prefers-reduced-motion: no-preference) {
    .service-card,
    .testimonial-card {
        transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, opacity 0.5s ease;
    }
}

/* Form input focus states */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(111, 156, 84, 0.15);
}

/* Selection color */
::selection {
    background-color: #c5dbb8;
    color: #1c3116;
}

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

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

::-webkit-scrollbar-thumb {
    background: #c5dbb8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9bbe88;
}
