/* ============================================
   Jess Tampa Remodeling & Sliding Doors
   Custom Styles
   ============================================ */

/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f2eb;
}
::-webkit-scrollbar-thumb {
    background: #89b48e;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3a7044;
}

/* Floating Card Animations */
.floating-card {
    animation: float 4s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -1.3s;
    animation-duration: 5s;
}

.floating-card:nth-child(3) {
    animation-delay: -2.6s;
    animation-duration: 4.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Service Card Hover Effects */
.service-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                box-shadow 0.4s ease, 
                border-color 0.4s ease;
}

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

/* Gallery Items */
.gallery-item {
    cursor: pointer;
    transition: transform 0.3s ease;
}

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

/* Scroll Reveal Animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }
.reveal[data-delay="5"] { transition-delay: 0.5s; }

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .floating-card {
        animation: none;
    }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
    .service-card:hover {
        transform: none;
    }
    .gallery-item:hover {
        transform: none;
    }
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(250, 248, 245, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(26, 58, 42, 0.08);
}

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

.navbar-scrolled .nav-logo-sub {
    color: #2a5634 !important;
}

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Mobile nav links */
.mobile-nav-link {
    position: relative;
    padding-left: 0;
}

.mobile-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: #3a7044;
    transition: width 0.3s ease;
}

.mobile-nav-link:hover::before {
    width: 16px;
}

/* Form select dropdown styling */
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='%233a7044' 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 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Button focus states for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #3a7044;
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background: #89b48e;
    color: #1a3a2a;
}

/* Print styles */
@media print {
    nav, .floating-card, #contact-form, button {
        display: none !important;
    }
    body {
        background: white !important;
    }
}
