/* Custom styles for State Farm Stroudsburg website */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f2faf7;
}
::-webkit-scrollbar-thumb {
    background: #a3b8d6;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7695c4;
}

/* Navigation transitions */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 4px 20px rgba(10, 16, 32, 0.06);
}

/* Nav links */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #2550a0, #3aad84);
    border-radius: 1px;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 60%;
}

/* Service cards */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2550a0, #3aad84);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover::before {
    opacity: 1;
}

/* Coverage items */
.coverage-item {
    position: relative;
}

/* Testimonial cards */
.testimonial-card {
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 24px;
    font-family: 'Playfair Display', serif;
    font-size: 80px;
    color: rgba(58, 173, 132, 0.15);
    line-height: 1;
}

/* Form inputs */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(58, 173, 132, 0.15);
}

/* Mobile menu */
#mobileMenu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-link {
    display: block;
}

/* Back to top button */
#backToTop.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

#backToTop:not(.visible) {
    transform: translateY(16px);
}

/* Scroll reveal base state (visible by default for progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* 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;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Tablet adjustments */
@media (max-width: 768px) {
    .font-display {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
}

/* Print styles */
@media print {
    #navbar,
    #backToTop,
    #contactForm {
        display: none !important;
    }
    
    body {
        color: #0a1020;
        background: white;
    }
    
    section {
        page-break-inside: avoid;
    }
}
