/* ===== Custom Styles for State Farm West Palm Beach ===== */

/* Base reset and smooth scrolling */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.navbar-scrolled .nav-text {
    color: #1b4313 !important;
}

.navbar-scrolled .nav-subtitle {
    color: #2a6b1c !important;
}

.navbar-scrolled .nav-link {
    color: #374151 !important;
}

.navbar-scrolled .nav-link:hover {
    color: #1b4313 !important;
}

/* Mobile menu animations */
.mobile-menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.mobile-menu-open .mobile-menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.25rem;
}

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered reveal delays */
.scroll-reveal:nth-child(1) { transition-delay: 0.05s; }
.scroll-reveal:nth-child(2) { transition-delay: 0.15s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.25s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.35s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.45s; }
.scroll-reveal:nth-child(6) { transition-delay: 0.55s; }

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top {
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Form focus states */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(45, 138, 40, 0.15);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #5aad3f;
}

/* Selection color */
::selection {
    background: #d9efcc;
    color: #1b4313;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: none;
    }
    
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* ===== Responsive adjustments ===== */
@media (max-width: 768px) {
    #hero h1 {
        font-size: 2.5rem;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 640px) {
    #hero h1 {
        font-size: 2rem;
    }
    
    section {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
