/* ========================================
   Kentucky Pride Lawn Care - Custom Styles
   ======================================== */

/* Base */
html {
    scroll-behavior: smooth;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #fefcf6;
}
::-webkit-scrollbar-thumb {
    background: #a11d28;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #841d2a;
}

/* Navbar */
.nav-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
}

.nav-fixed.scrolled {
    background: rgba(255, 254, 246, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(161, 29, 40, 0.08);
}

.nav-link {
    position: relative;
}

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

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

.nav-fixed:not(.scrolled) .nav-link {
    color: rgba(255, 255, 255, 0.9);
}

.nav-fixed:not(.scrolled) .nav-link:hover {
    color: #f9c5c9;
}

.nav-fixed:not(.scrolled) .nav-link::after {
    background: #f9c5c9;
}

/* Hero */
.hero-section {
    position: relative;
}

.scroll-indicator {
    display: inline-flex;
    animation: bounce 2s infinite;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.scroll-indicator:hover {
    opacity: 1;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-10px) translateX(-50%); }
    60% { transform: translateY(-5px) translateX(-50%); }
}

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

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

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

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

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: #a11d28;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(161, 29, 40, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #841d2a;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(161, 29, 40, 0.5);
}

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

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

/* Input focus styles */
input:focus,
select:focus,
textarea:focus {
    border-color: #a11d28 !important;
    box-shadow: 0 0 0 3px rgba(161, 29, 40, 0.1) !important;
}

/* Selection color */
::selection {
    background: #f9c5c9;
    color: #3d0710;
}

/* Mobile menu active state */
.mobile-nav-link.active {
    color: #a11d28 !important;
}

/* Gallery image hover overlay */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-fixed {
        background: rgba(255, 254, 246, 0.98);
        backdrop-filter: blur(12px);
        box-shadow: 0 2px 20px rgba(161, 29, 40, 0.06);
    }

    .nav-fixed:not(.scrolled) .nav-link,
    .nav-fixed:not(.scrolled) .nav-link:hover {
        color: inherit;
    }

    .nav-fixed:not(.scrolled) .nav-link::after {
        display: none;
    }

    .font-display {
        font-weight: 700;
    }
}
