/* ===== Custom Styles for Hernandez Remodeling ===== */

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

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

::-webkit-scrollbar-track {
    background: #040B18;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #1AB880;
}

/* Navigation scroll effect */
.nav-scrolled {
    background: rgba(4, 11, 24, 0.92) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Mobile menu */
.mobile-menu {
    animation: slideDown 0.3s ease-out;
}

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

/* Mobile menu button animation */
.menu-line {
    transition: all 0.3s ease;
}

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

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Service card hover effects */
.service-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: rgba(26, 184, 128, 0.3);
    box-shadow: 0 20px 60px -20px rgba(26, 184, 128, 0.15);
}

/* Testimonial card hover */
.testimonial-card {
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-2px);
    border-color: rgba(26, 184, 128, 0.2);
}

/* Gallery image hover */
.gallery-item {
    overflow: hidden;
    border-radius: 1rem;
}

.gallery-item img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Floating animation for decorative elements */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(12deg); }
    50% { transform: translateY(-15px) rotate(12deg); }
}

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

.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; }

/* 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, height 0.6s;
}

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

/* Selection color */
::selection {
    background: rgba(26, 184, 128, 0.3);
    color: #ffffff;
}

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

/* Reduced motion preference */
@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;
    }
}

/* Mobile menu active state */
.mobile-menu.active {
    display: block;
}

/* Custom select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Image aspect ratios */
.aspect-hero {
    aspect-ratio: 16/9;
}

/* Gradient text utility */
.gradient-text {
    background: linear-gradient(135deg, #1AB880 0%, #44D4A0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Pulse dot animation */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.animate-pulse-dot {
    animation: pulse-dot 2s ease-in-out infinite;
}

/* Geometric pattern for sections */
.geometric-bg {
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(26, 184, 128, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(26, 184, 128, 0.03) 0%, transparent 50%);
}

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

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

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

/* Mobile nav link hover */
.mobile-link {
    transition: all 0.2s ease;
}

.mobile-link:hover {
    padding-left: 1rem;
}
