/* ===== Custom Styles for Fitness Solutions ===== */

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

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f7f7f8;
}
::-webkit-scrollbar-thumb {
    background: #d4d4de;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #FF6B52;
}

/* ===== Navbar ===== */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.nav-logo-text {
    transition: color 0.4s ease;
}

#navbar:not(.scrolled) .nav-logo-text {
    color: #1e1e28;
}

#navbar.scrolled .nav-logo-text {
    color: #1e1e28;
}

/* ===== Hero Floating Cards ===== */
.floating-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.floating-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 20px 60px rgba(255, 107, 82, 0.15);
}

.card-1 { animation: float1 6s ease-in-out infinite; }
.card-2 { animation: float2 7s ease-in-out infinite; }
.card-3 { animation: float3 5.5s ease-in-out infinite; }
.card-4 { animation: float4 6.5s ease-in-out infinite; }

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

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

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

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

/* Scroll Line Animation */
@keyframes scrollLine {
    0% { top: -16px; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { top: 48px; opacity: 0; }
}

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

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

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

/* ===== Gallery ===== */
.gallery-item {
    cursor: pointer;
}

.gallery-item img {
    will-change: transform;
}

/* ===== Testimonials ===== */
.testimonial-card {
    transition: transform 0.4s ease;
}

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

/* ===== Mobile Menu ===== */
#mobileMenu {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Mobile menu icon animation */
#menuBtn.active #bar1 {
    transform: rotate(45deg) translate(4px, 4px);
}

#menuBtn.active #bar2 {
    opacity: 0;
    width: 0;
}

#menuBtn.active #bar3 {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .floating-card,
    .service-card,
    .testimonial-card,
    .gallery-item img {
        animation: none !important;
        transition: none !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .animate-scroll-line {
        animation: none;
    }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .floating-card {
        display: none;
    }
}
