/* ===== Custom Styles for BBO Professional Carpet Cleaning ===== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #FDF8F6;
}
::-webkit-scrollbar-thumb {
    background: #7B2D3B;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #A82538;
}

/* ===== Floating Card Animations ===== */
@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}
@keyframes float-medium {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}
@keyframes float-fast {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-16px); }
}

.floating-card-1 {
    animation: float-slow 4s ease-in-out infinite;
}
.floating-card-2 {
    animation: float-medium 3.5s ease-in-out infinite;
}
.floating-card-3 {
    animation: float-fast 3s ease-in-out infinite;
}

/* ===== Scroll Reveal (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
    .reveal:nth-child(5) { transition-delay: 0.4s; }
    .reveal:nth-child(6) { transition-delay: 0.5s; }
}

/* Always visible for reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ===== Service Card Hover ===== */
.service-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* ===== Back to Top ===== */
.back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.back-to-top:not(.visible) {
    transform: translateY(20px);
}

/* ===== Navbar Transition ===== */
#navbar.scrolled {
    background: rgba(253, 248, 246, 0.95);
    backdrop-blur-xl;
    box-shadow: 0 4px 30px rgba(123, 45, 59, 0.08);
}

/* ===== Mobile Menu Transition ===== */
#mobile-menu {
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

/* ===== Button Focus States ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #A8445A;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* ===== Selection Color ===== */
::selection {
    background: #F5B4BE;
    color: #3D141A;
}
