/* Custom styles for B&Y Insurance Agency */

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

/* Navbar scroll effect */
#navbar.scrolled {
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

/* Mobile menu animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobile-menu.open {
    max-height: 400px;
}

.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #5eead4;
    transition: width 0.3s ease;
}

.mobile-link:hover::after {
    width: 100%;
}

/* Service card hover lift */
.service-card {
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

/* Fade in animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered fade-in for grid items */
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }
.fade-in-delay-5 { transition-delay: 0.5s; }
.fade-in-delay-6 { transition-delay: 0.6s; }

/* Form focus styles */
input:focus, select:focus, textarea:focus {
    outline: none;
}

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

::-webkit-scrollbar-track {
    background: #0f172a;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #14b8a6;
}

/* Geometric shape animations */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes float-reverse {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(20px) rotate(-5deg); }
}

.float-1 { animation: float 6s ease-in-out infinite; }
.float-2 { animation: float-reverse 8s ease-in-out infinite; }
.float-3 { animation: float 7s ease-in-out infinite; animation-delay: 1s; }

/* Hero parallax effect */
.hero-bg {
    will-change: transform;
}

/* 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;
}

/* Testimonial card hover */
.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-2px);
}

/* Contact form input transitions */
input, select, textarea {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .service-card {
        padding: 1.5rem;
    }
    
    .floating-card {
        position: relative !important;
        bottom: auto !important;
        right: auto !important;
        margin-top: 1rem;
    }
}

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